1. 18 6月, 2009 3 次提交
    • A
      nfs41: add session reset to state manager · c3fad1b1
      Andy Adamson 提交于
      Move the code to reset a session from the session_reclaimer to the
      nfs4_state_manager.  Destroy the session, and create a new one. Treat
      NFS4ERR_BADSESSION and NFS4ERR_DEADSESSION as a successful
      nfs4_proc_destroy_session. Signal nfs4_proc_create_session that this is a
      session reset so that the session slot table is re-used.
      
      If the clientid is stale, set both NFS4CLNT_LEASE_EXPIRED and
      NFS4CLNT_SESSION_SETUP bits and retry.
      
      Use a switch statement in nfs4_session_recovery_handle_error for future
      patche which will add handling for other errors.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      
      [nfs41: session reset in nfs4_recovery_handle_error]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      [nfs41: reset session on nfs4_do_reclaim session reset error]
          If nfs4_do_reclaim gets a session reset error, nfs4_recovery_handle_error
          will set the NFS4CLNT_SESSION_SETUP bit, and the state manager should
          continue processing to reset the session.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [move nfs4_proc_destroy_session declaration here]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c3fad1b1
    • A
      nfs41: add session setup to the state manager · 76db6d95
      Andy Adamson 提交于
      At mount, nfs_alloc_client sets the cl_state NFS4CLNT_LEASE_EXPIRED bit
      and nfs4_alloc_session sets the NFS4CLNT_SESSION_SETUP bit, so both bits are
      set when nfs4_lookup_root calls nfs4_recover_expired_lease which schedules
      the nfs4_state_manager and waits for it to complete.
      
      Place the session setup after the clientid establishment in nfs4_state_manager
      so that the session is setup right after the clientid has been established
      without rescheduling the state manager.
      
      Unlike nfsv4.0, the nfs_client struct is not ready to use until the session
      has been established.  Postpone marking the nfs_client struct to NFS_CS_READY
      until after a successful CREATE_SESSION call so that other threads cannot use
      the client until the session is established.
      
      If the EXCHANGE_ID call fails and the session has not been setup (the
      NFS4CLNT_SESSION_SETUP bit is set), mark the client with the error and return.
      
      If the session setup CREATE_SESSION call fails with NFS4ERR_STALE_CLIENTID
      which could occur due to server reboot or network partition inbetween the
      EXCHANGE_ID and CREATE_SESSION call, reset the NFS4CLNT_LEASE_EXPIRED and
      NFS4CLNT_SESSION_SETUP bits and try again.
      
      If the CREATE_SESSION call fails with other errors, mark the client with
      the error and return.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      
      [nfs41: NFS_CS_SESSION_SETUP cl_cons_state for back channel setup]
        On session setup, the CREATE_SESSION reply races with the server back channel
        probe which needs to succeed to setup the back channel. Set a new
        cl_cons_state NFS_CS_SESSION_SETUP just prior to the CREATE_SESSION call
        and add it as a valid state to nfs_find_client so that the client back channel
        can find the nfs_client struct and won't drop the server backchannel probe.
        Use a new cl_cons_state so that NFSv4.0 back channel behaviour which only
        sets NFS_CS_READY is unchanged.
        Adjust waiting on the nfs_client_active_wq accordingly.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      
      [nfs41: rename NFS_CS_SESSION_SETUP to NFS_CS_SESSION_INITING]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      [nfs41: set NFS_CL_SESSION_INITING in alloc_session]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      [nfs41: move session setup into a function]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [moved nfs4_proc_create_session declaration here]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      76db6d95
    • B
      nfs41: translate NFS4ERR_MINOR_VERS_MISMATCH to EPROTONOSUPPORT · c2e713dd
      Benny Halevy 提交于
      To be returned to the mount command when trying to mount a v4 server
      using minorversion 1.
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c2e713dd
  2. 29 3月, 2009 1 次提交
    • C
      NFS: Start PF_INET6 callback listener only if IPv6 support is available · f738f517
      Chuck Lever 提交于
      Apparently a lot of people need to disable IPv6 completely on their
      distributor-built systems, which have CONFIG_IPV6_MODULE enabled at
      build time.
      
      They do this by blacklisting the ipv6.ko module.  This causes the
      creation of the NFSv4 callback service listener to fail if
      CONFIG_IPV6_MODULE is set, but the module cannot be loaded.
      
      Now that the kernel's PF_INET6 RPC listeners are completely separate
      from PF_INET listeners, we can always start PF_INET.  Then the NFS
      client can try to start a PF_INET6 listener, but it isn't required
      to be available.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f738f517
  3. 24 12月, 2008 16 次提交
  4. 16 7月, 2008 1 次提交
  5. 17 5月, 2008 2 次提交
  6. 20 4月, 2008 1 次提交
  7. 29 2月, 2008 1 次提交
  8. 26 2月, 2008 1 次提交
    • T
      SUNRPC: Run rpc timeout functions as callbacks instead of in softirqs · 5d00837b
      Trond Myklebust 提交于
      An audit of the current RPC timeout functions shows that they don't really
      ever need to run in the softirq context. As long as the softirq is
      able to signal that the wakeup is due to a timeout (which it can do by
      setting task->tk_status to -ETIMEDOUT) then the callback functions can just
      run as standard task->tk_callback functions (in the rpciod/process
      context).
      
      The only possible border-line case would be xprt_timer() for the case of
      UDP, when the callback is used to reduce the size of the transport
      congestion window. In testing, however, the effect of moving that update
      to a callback would appear to be minor.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5d00837b
  9. 21 2月, 2008 1 次提交
    • H
      nfs: fix sparse warnings · 90dc7d27
      Harvey Harrison 提交于
      fs/nfs/nfs4state.c:788:34: warning: Using plain integer as NULL pointer
      fs/nfs/delegation.c:52:34: warning: Using plain integer as NULL pointer
      fs/nfs/idmap.c:312:12: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:257:6: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:270:6: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:281:6: warning: Using plain integer as NULL pointer
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      90dc7d27
  10. 14 2月, 2008 1 次提交
  11. 30 1月, 2008 2 次提交
  12. 11 1月, 2008 1 次提交
  13. 20 10月, 2007 1 次提交
  14. 10 10月, 2007 1 次提交
  15. 08 8月, 2007 1 次提交
  16. 11 7月, 2007 6 次提交