1. 09 6月, 2013 6 次提交
  2. 07 5月, 2013 2 次提交
  3. 04 5月, 2013 1 次提交
  4. 29 4月, 2013 2 次提交
  5. 24 4月, 2013 3 次提交
  6. 22 4月, 2013 1 次提交
  7. 20 4月, 2013 2 次提交
  8. 17 4月, 2013 1 次提交
  9. 13 4月, 2013 1 次提交
  10. 11 4月, 2013 1 次提交
  11. 10 4月, 2013 1 次提交
  12. 09 4月, 2013 1 次提交
    • T
      NFSv4: Handle timeouts correctly when probing for lease validity · bc7a05ca
      Trond Myklebust 提交于
      When we send a RENEW or SEQUENCE operation in order to probe if the
      lease is still valid, we want it to be able to time out since the
      lease we are probing is likely to time out too. Currently, because
      we use soft mount semantics for these RPC calls, the return value
      is EIO, which causes the state manager to exit with an "unhandled
      error" message.
      This patch changes the call semantics, so that the RPC layer returns
      ETIMEDOUT instead of EIO. We then have the state manager default to
      a simple retry instead of exiting.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      bc7a05ca
  13. 06 4月, 2013 5 次提交
  14. 30 3月, 2013 5 次提交
    • C
      NFS: Try AUTH_UNIX when PUTROOTFH gets NFS4ERR_WRONGSEC · c4eafe11
      Chuck Lever 提交于
      Most NFSv4 servers implement AUTH_UNIX, and administrators will
      prefer this over AUTH_NULL.  It is harmless for our client to try
      this flavor in addition to the flavors mandated by RFC 3530/5661.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c4eafe11
    • C
      NFS: Use static list of security flavors during root FH lookup recovery · 9a744ba3
      Chuck Lever 提交于
      If the Linux NFS client receives an NFS4ERR_WRONGSEC error while
      trying to look up an NFS server's root file handle, it retries the
      lookup operation with various security flavors to see what flavor
      the NFS server will accept for pseudo-fs access.
      
      The list of flavors the client uses during retry consists only of
      flavors that are currently registered in the kernel RPC client.
      This list may not include any GSS pseudoflavors if auth_rpcgss.ko
      has not yet been loaded.
      
      Let's instead use a static list of security flavors that the NFS
      standard requires the server to implement (RFC 3530bis, section
      3.2.1).  The RPC client should now be able to load support for
      these dynamically; if not, they are skipped.
      
      Recovery behavior here is prescribed by RFC 3530bis, section
      15.33.5:
      
      > For LOOKUPP, PUTROOTFH and PUTPUBFH, the client will be unable to
      > use the SECINFO operation since SECINFO requires a current
      > filehandle and none exist for these two [sic] operations.  Therefore,
      > the client must iterate through the security triples available at
      > the client and reattempt the PUTROOTFH or PUTPUBFH operation.  In
      > the unfortunate event none of the MANDATORY security triples are
      > supported by the client and server, the client SHOULD try using
      > others that support integrity.  Failing that, the client can try
      > using AUTH_NONE, but because such forms lack integrity checks,
      > this puts the client at risk.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: Bryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9a744ba3
    • C
      NFS: Avoid PUTROOTFH when managing leases · 83ca7f5a
      Chuck Lever 提交于
      Currently, the compound operation the Linux NFS client sends to the
      server to confirm a client ID looks like this:
      
      	{ SETCLIENTID_CONFIRM; PUTROOTFH; GETATTR(lease_time) }
      
      Once the lease is confirmed, it makes sense to know how long before
      the client will have to renew it.  And, performing these operations
      in the same compound saves a round trip.
      
      Unfortunately, this arrangement assumes that the security flavor
      used for establishing a client ID can also be used to access the
      server's pseudo-fs.
      
      If the server requires a different security flavor to access its
      pseudo-fs than it allowed for the client's SETCLIENTID operation,
      the PUTROOTFH in this compound fails with NFS4ERR_WRONGSEC.  Even
      though the SETCLIENTID_CONFIRM succeeded, our client's trunking
      detection logic interprets the failure of the compound as a failure
      by the server to confirm the client ID.
      
      As part of server trunking detection, the client then begins another
      SETCLIENTID pass with the same nfs4_client_id.  This fails with
      NFS4ERR_CLID_INUSE because the first SETCLIENTID/SETCLIENTID_CONFIRM
      already succeeded in confirming that client ID -- it was the
      PUTROOTFH operation that caused the SETCLIENTID_CONFIRM compound to
      fail.
      
      To address this issue, separate the "establish client ID" step from
      the "accessing the server's pseudo-fs root" step.  The first access
      of the server's pseudo-fs may require retrying the PUTROOTFH
      operation with different security flavors.  This access is done in
      nfs4_proc_get_rootfh().
      
      That leaves the matter of how to retrieve the server's lease time.
      nfs4_proc_fsinfo() already retrieves the lease time value, though
      none of its callers do anything with the retrieved value (nor do
      they mark the lease as "renewed").
      
      Note that NFSv4.1 state recovery invokes nfs4_proc_get_lease_time()
      using the lease management security flavor.  This may cause some
      heartburn if that security flavor isn't the same as the security
      flavor the server requires for accessing the pseudo-fs.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: Bryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      83ca7f5a
    • C
      NFS: Clean up nfs4_proc_get_rootfh · 2ed4b95b
      Chuck Lever 提交于
      The long lines with no vertical white space make this function
      difficult for humans to read.  Add a proper documenting comment
      while we're here.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: Bryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2ed4b95b
    • C
      NFS: Handle missing rpc.gssd when looking up root FH · 75bc8821
      Chuck Lever 提交于
      When rpc.gssd is not running, any NFS operation that needs to use a
      GSS security flavor of course does not work.
      
      If looking up a server's root file handle results in an
      NFS4ERR_WRONGSEC, nfs4_find_root_sec() is called to try a bunch of
      security flavors until one works or all reasonable flavors have
      been tried.  When rpc.gssd isn't running, this loop seems to fail
      immediately after rpcauth_create() craps out on the first GSS
      flavor.
      
      When the rpcauth_create() call in nfs4_lookup_root_sec() fails
      because rpc.gssd is not available, nfs4_lookup_root_sec()
      unconditionally returns -EIO.  This prevents nfs4_find_root_sec()
      from retrying any other flavors; it drops out of its loop and fails
      immediately.
      
      Having nfs4_lookup_root_sec() return -EACCES instead allows
      nfs4_find_root_sec() to try all flavors in its list.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: Bryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      75bc8821
  15. 29 3月, 2013 1 次提交
  16. 28 3月, 2013 1 次提交
  17. 26 3月, 2013 6 次提交