1. 25 9月, 2014 1 次提交
    • N
      NFSv4: use exponential retry on NFS4ERR_DELAY for async requests. · 8478eaa1
      NeilBrown 提交于
      Currently asynchronous NFSv4 request will be retried with
      exponential timeout (from 1/10 to 15 seconds), but async
      requests will always use a 15second retry.
      
      Some "async" requests are really synchronous though.  The
      async mechanism is used to allow the request to continue if
      the requesting process is killed.
      In those cases, an exponential retry is appropriate.
      
      For example, if two different clients both open a file and
      get a READ delegation, and one client then unlinks the file
      (while still holding an open file descriptor), that unlink
      will used the "silly-rename" handling which is async.
      The first rename will result in NFS4ERR_DELAY while the
      delegation is reclaimed from the other client.  The rename
      will not be retried for 15 seconds, causing an unlink to take
      15 seconds rather than 100msec.
      
      This patch only added exponential timeout for async unlink and
      async rename.  Other async calls, such as 'close' are sometimes
      waited for so they might benefit from exponential timeout too.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      8478eaa1
  2. 13 9月, 2014 1 次提交
  3. 11 9月, 2014 2 次提交
  4. 13 7月, 2014 1 次提交
  5. 25 6月, 2014 5 次提交
  6. 29 5月, 2014 11 次提交
  7. 18 3月, 2014 2 次提交
  8. 02 3月, 2014 1 次提交
  9. 02 2月, 2014 1 次提交
  10. 29 10月, 2013 4 次提交
    • W
      NFS: add support for multiple sec= mount options · 4d4b69dd
      Weston Andros Adamson 提交于
      This patch adds support for multiple security options which can be
      specified using a colon-delimited list of security flavors (the same
      syntax as nfsd's exports file).
      
      This is useful, for instance, when NFSv4.x mounts cross SECINFO
      boundaries. With this patch a user can use "sec=krb5i,krb5p"
      to mount a remote filesystem using krb5i, but can still cross
      into krb5p-only exports.
      
      New mounts will try all security options before failing.  NFSv4.x
      SECINFO results will be compared against the sec= flavors to
      find the first flavor in both lists or if no match is found will
      return -EPERM.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4d4b69dd
    • W
      NFS: separate passed security flavs from selected · a3f73c27
      Weston Andros Adamson 提交于
      When filling parsed_mount_data, store the parsed sec= mount option in
      the new struct nfs_auth_info and the chosen flavor in selected_flavor.
      
      This patch lays the groundwork for supporting multiple sec= options.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a3f73c27
    • C
      NFS: Add method to detect whether an FSID is still on the server · 44c99933
      Chuck Lever 提交于
      Introduce a mechanism for probing a server to determine if an FSID
      is present or absent.
      
      The on-the-wire compound is different between minor version 0 and 1.
      Minor version 0 appends a RENEW operation to identify which client
      ID is probing.  Minor version 1 has a SEQUENCE operation in the
      compound which effectively carries the same information.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      44c99933
    • C
      NFS: Add method to retrieve fs_locations during migration recovery · b03d735b
      Chuck Lever 提交于
      The nfs4_proc_fs_locations() function is invoked during referral
      processing to perform a GETATTR(fs_locations) on an object's parent
      directory in order to discover the target of the referral.  It
      performs a LOOKUP in the compound, so the client needs to know the
      parent's file handle a priori.
      
      Unfortunately this function is not adequate for handling migration
      recovery.  We need to probe fs_locations information on an FSID, but
      there's no parent directory available for many operations that
      can return NFS4ERR_MOVED.
      
      Another subtlety: recovering from NFS4ERR_LEASE_MOVED is a process
      of walking over a list of known FSIDs that reside on the server, and
      probing whether they have migrated.  Once the server has detected
      that the client has probed all migrated file systems, it stops
      returning NFS4ERR_LEASE_MOVED.
      
      A minor version zero server needs to know what client ID is
      requesting fs_locations information so it can clear the flag that
      forces it to continue returning NFS4ERR_LEASE_MOVED.  This flag is
      set per client ID and per FSID.  However, the client ID is not an
      argument of either the PUTFH or GETATTR operations.  Later minor
      versions have client ID information embedded in the compound's
      SEQUENCE operation.
      
      Therefore, by convention, minor version zero clients send a RENEW
      operation in the same compound as the GETATTR(fs_locations), since
      RENEW's one argument is a clientid4.  This allows a minor version
      zero server to identify correctly the client that is probing for a
      migration.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b03d735b
  11. 26 9月, 2013 1 次提交
  12. 05 9月, 2013 2 次提交
    • W
      nfs4.1: Minimal SP4_MACH_CRED implementation · 2031cd1a
      Weston Andros Adamson 提交于
      This is a minimal client side implementation of SP4_MACH_CRED.  It will
      attempt to negotiate SP4_MACH_CRED iff the EXCHANGE_ID is using
      krb5i or krb5p auth.  SP4_MACH_CRED will be used if the server supports the
      minimal operations:
      
       BIND_CONN_TO_SESSION
       EXCHANGE_ID
       CREATE_SESSION
       DESTROY_SESSION
       DESTROY_CLIENTID
      
      This patch only includes the EXCHANGE_ID negotiation code because
      the client will already use the machine cred for these operations.
      
      If the server doesn't support SP4_MACH_CRED or doesn't support the minimal
      operations, the exchange id will be resent with SP4_NONE.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2031cd1a
    • N
      NFSv4: Don't try to recover NFSv4 locks when they are lost. · ef1820f9
      NeilBrown 提交于
      When an NFSv4 client loses contact with the server it can lose any
      locks that it holds.
      
      Currently when it reconnects to the server it simply tries to reclaim
      those locks.  This might succeed even though some other client has
      held and released a lock in the mean time.  So the first client might
      think the file is unchanged, but it isn't.  This isn't good.
      
      If, when recovery happens, the locks cannot be claimed because some
      other client still holds the lock, then we get a message in the kernel
      logs, but the client can still write.  So two clients can both think
      they have a lock and can both write at the same time.  This is equally
      not good.
      
      There was a patch a while ago
        http://comments.gmane.org/gmane.linux.nfs/41917
      
      which tried to address some of this, but it didn't seem to go
      anywhere.  That patch would also send a signal to the process.  That
      might be useful but for now this patch just causes writes to fail.
      
      For NFSv4 (unlike v2/v3) there is a strong link between the lock and
      the write request so we can fairly easily fail any IO of the lock is
      gone.  While some applications might not expect this, it is still
      safer than allowing the write to succeed.
      
      Because this is a fairly big change in behaviour a module parameter,
      "recover_locks", is introduced which defaults to true (the current
      behaviour) but can be set to "false" to tell the client not to try to
      recover things that were lost.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ef1820f9
  13. 08 8月, 2013 1 次提交
  14. 09 6月, 2013 3 次提交
  15. 07 6月, 2013 1 次提交
  16. 07 5月, 2013 1 次提交
  17. 17 4月, 2013 1 次提交
  18. 30 3月, 2013 1 次提交
    • C
      SUNRPC: Define rpcsec_gss_info structure · fb15b26f
      Chuck Lever 提交于
      The NFSv4 SECINFO procedure returns a list of security flavors.  Any
      GSS flavor also has a GSS tuple containing an OID, a quality-of-
      protection value, and a service value, which specifies a particular
      GSS pseudoflavor.
      
      For simplicity and efficiency, I'd like to return each GSS tuple
      from the NFSv4 SECINFO XDR decoder and pass it straight into the RPC
      client.
      
      Define a data structure that is visible to both the NFS client and
      the RPC client.  Take structure and field names from the relevant
      standards to avoid confusion.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fb15b26f