1. 21 11月, 2012 3 次提交
  2. 05 11月, 2012 2 次提交
  3. 03 11月, 2012 1 次提交
  4. 02 11月, 2012 1 次提交
  5. 01 11月, 2012 4 次提交
  6. 04 10月, 2012 1 次提交
  7. 03 10月, 2012 4 次提交
  8. 02 10月, 2012 8 次提交
    • T
      NFSv4.1: Handle BAD_STATEID and EXPIRED errors in layoutget · ee314c2a
      Trond Myklebust 提交于
      If the layoutget call returns a stateid error, we want to invalidate the
      layout stateid, and/or recover the open stateid.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ee314c2a
    • P
      NFS41: fix error of setting blocklayoutdriver · dc182549
      Peng Tao 提交于
      After commit e38eb650 (NFS: set_pnfs_layoutdriver() from
      nfs4_proc_fsinfo()), set_pnfs_layoutdriver() is called inside
      nfs4_proc_fsinfo(), but pnfs_blksize is not set. It causes setting
      blocklayoutdriver failure and pnfsblock mount failure.
      
      Cc: stable <stable@vger.kernel.org> [since v3.5]
      Signed-off-by: NPeng Tao <tao.peng@emc.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      dc182549
    • C
      NFS: Add nfs4_unique_id boot parameter · 6f2ea7f2
      Chuck Lever 提交于
      An optional boot parameter is introduced to allow client
      administrators to specify a string that the Linux NFS client can
      insert into its nfs_client_id4 id string, to make it both more
      globally unique, and to ensure that it doesn't change even if the
      client's nodename changes.
      
      If this boot parameter is not specified, the client's nodename is
      used, as before.
      
      Client installation procedures can create a unique string (typically,
      a UUID) which remains unchanged during the lifetime of that client
      instance.  This works just like creating a UUID for the label of the
      system's root and boot volumes.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6f2ea7f2
    • C
      NFS: Discover NFSv4 server trunking when mounting · 05f4c350
      Chuck Lever 提交于
      "Server trunking" is a fancy named for a multi-homed NFS server.
      Trunking might occur if a client sends NFS requests for a single
      workload to multiple network interfaces on the same server.  There
      are some implications for NFSv4 state management that make it useful
      for a client to know if a single NFSv4 server instance is
      multi-homed.  (Note this is only a consideration for NFSv4, not for
      legacy versions of NFS, which are stateless).
      
      If a client cares about server trunking, no NFSv4 operations can
      proceed until that client determines who it is talking to.  Thus
      server IP trunking discovery must be done when the client first
      encounters an unfamiliar server IP address.
      
      The nfs_get_client() function walks the nfs_client_list and matches
      on server IP address.  The outcome of that walk tells us immediately
      if we have an unfamiliar server IP address.  It invokes
      nfs_init_client() in this case.  Thus, nfs4_init_client() is a good
      spot to perform trunking discovery.
      
      Discovery requires a client to establish a fresh client ID, so our
      client will now send SETCLIENTID or EXCHANGE_ID as the first NFS
      operation after a successful ping, rather than waiting for an
      application to perform an operation that requires NFSv4 state.
      
      The exact process for detecting trunking is different for NFSv4.0 and
      NFSv4.1, so a minorversion-specific init_client callout method is
      introduced.
      
      CLID_INUSE recovery is important for the trunking discovery process.
      CLID_INUSE is a sign the server recognizes the client's nfs_client_id4
      id string, but the client is using the wrong principal this time for
      the SETCLIENTID operation.  The SETCLIENTID must be retried with a
      series of different principals until one works, and then the rest of
      trunking discovery can proceed.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      05f4c350
    • C
      NFS: Use the same nfs_client_id4 for every server · e984a55a
      Chuck Lever 提交于
      Currently, when identifying itself to NFS servers, the Linux NFS
      client uses a unique nfs_client_id4.id string for each server IP
      address it talks with.  For example, when client A talks to server X,
      the client identifies itself using a string like "AX".  The
      requirements for these strings are specified in detail by RFC 3530
      (and bis).
      
      This form of client identification presents a problem for Transparent
      State Migration.  When client A's state on server X is migrated to
      server Y, it continues to be associated with string "AX."  But,
      according to the rules of client string construction above, client
      A will present string "AY" when communicating with server Y.
      
      Server Y thus has no way to know that client A should be associated
      with the state migrated from server X.  "AX" is all but abandoned,
      interfering with establishing fresh state for client A on server Y.
      
      To support transparent state migration, then, NFSv4.0 clients must
      instead use the same nfs_client_id4.id string to identify themselves
      to every NFS server; something like "A".
      
      Now a client identifies itself as "A" to server X.  When a file
      system on server X transitions to server Y, and client A identifies
      itself as "A" to server Y, Y will know immediately that the state
      associated with "A," whether it is native or migrated, is owned by
      the client, and can merge both into a single lease.
      
      As a pre-requisite to adding support for NFSv4 migration to the Linux
      NFS client, this patch changes the way Linux identifies itself to NFS
      servers via the SETCLIENTID (NFSv4 minor version 0) and EXCHANGE_ID
      (NFSv4 minor version 1) operations.
      
      In addition to removing the server's IP address from nfs_client_id4,
      the Linux NFS client will also no longer use its own source IP address
      as part of the nfs_client_id4 string.  On multi-homed clients, the
      value of this address depends on the address family and network
      routing used to contact the server, thus it can be different for each
      server.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e984a55a
    • W
      NFSv4: Add ACCESS operation to OPEN compound · 6168f62c
      Weston Andros Adamson 提交于
      The OPEN operation has no way to differentiate an open for read and an
      open for execution - both look like read to the server. This allowed
      users to read files that didn't have READ access but did have EXEC access,
      which is obviously wrong.
      
      This patch adds an ACCESS call to the OPEN compound to handle the
      difference between OPENs for reading and execution.  Since we're going
      through the trouble of calling ACCESS, we check all possible access bits
      and cache the results hopefully avoiding an ACCESS call in the future.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6168f62c
    • B
      NFS: Remove bad delegations during open recovery · 6938867e
      Bryan Schumaker 提交于
      I put the client into an open recovery loop by:
      	Client: Open file
      		read half
      	Server: Expire client (echo 0 > /sys/kernel/debug/nfsd/forget_clients)
      	Client: Drop vm cache (echo 3 > /proc/sys/vm/drop_caches)
      		finish reading file
      
      This causes a loop because the client never updates the nfs4_state after
      discovering that the delegation is invalid.  This means it will keep
      trying to read using the bad delegation rather than attempting to re-open
      the file.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      CC: stable@vger.kernel.org [3.4+]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6938867e
    • B
      NFS: Always use the open stateid when checking for expired opens · fcb6d9c6
      Bryan Schumaker 提交于
      If we are reading through a delegation, and the delegation is OK then
      state->stateid will still point to a delegation stateid and not an open
      stateid.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fcb6d9c6
  9. 29 9月, 2012 8 次提交
  10. 25 9月, 2012 1 次提交
  11. 06 9月, 2012 1 次提交
  12. 05 9月, 2012 2 次提交
  13. 17 8月, 2012 2 次提交
    • T
      NFSv4: Fix the acl cache size calculation · b291f1b1
      Trond Myklebust 提交于
      Currently, we do not take into account the size of the 16 byte
      struct nfs4_cached_acl header, when deciding whether or not we should
      cache the acl data.  Consequently, we will end up allocating an
      8k buffer in order to fit a maximum size 4k acl.
      
      This patch adjusts the calculation so that we limit the cache size
      to 4k for the acl header+data.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b291f1b1
    • T
      NFSv4: Fix pointer arithmetic in decode_getacl · 519d3959
      Trond Myklebust 提交于
      Resetting the cursor xdr->p to a previous value is not a safe
      practice: if the xdr_stream has crossed out of the initial iovec,
      then a bunch of other fields would need to be reset too.
      
      Fix this issue by using xdr_enter_page() so that the buffer gets
      page aligned at the bitmap _before_ we decode it.
      
      Also fix the confusion of the ACL length with the page buffer length
      by not adding the base offset to the ACL length...
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org
      519d3959
  14. 09 8月, 2012 1 次提交
  15. 03 8月, 2012 1 次提交