1. 03 3月, 2012 5 次提交
    • C
      NFS: Introduce NFS_ATTR_FATTR_V4_LOCATIONS · 81934ddb
      Chuck Lever 提交于
      The Linux NFS client must distinguish between referral events (which
      it currently supports) and migration events (which it does not yet
      support).
      
      In both types of events, an fs_locations array is returned.  But upper
      layers, not the XDR layer, should make the distinction between a
      referral and a migration.  There really isn't a way for an XDR decoder
      function to distinguish the two, in general.
      
      Slightly adjust the FATTR flags returned by decode_fs_locations()
      to set NFS_ATTR_FATTR_V4_LOCATIONS only if a non-empty locations
      array was returned from the server.  Then have logic in nfs4proc.c
      distinguish whether the locations array is for a referral or
      something else.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      81934ddb
    • C
      NFS: Add a client-side function to display NFS file handles · 20d27e92
      Chuck Lever 提交于
      For debugging, introduce a simplistic function to print NFS file
      handles on the system console.  The main function is hooked into the
      dprintk debugging facility, but you can directly call the helper,
      _nfs_display_fhandle(), if you want to print a handle unconditionally.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      20d27e92
    • C
      SUNRPC: Add API to acquire source address · 2e738fdc
      Chuck Lever 提交于
      NFSv4.0 clients must send endpoint information for their callback
      service to NFSv4.0 servers during their first contact with a server.
      Traditionally on Linux, user space provides the callback endpoint IP
      address via the "clientaddr=" mount option.
      
      During an NFSv4 migration event, it is possible that an FSID may be
      migrated to a destination server that is accessible via a different
      source IP address than the source server was.  The client must update
      callback endpoint information on the destination server so that it can
      maintain leases and allow delegation.
      
      Without a new "clientaddr=" option from user space, however, the
      kernel itself must construct an appropriate IP address for the
      callback update.  Provide an API in the RPC client for upper layer
      RPC consumers to acquire a source address for a remote.
      
      The mechanism used by the mount.nfs command is copied: set up a
      connected UDP socket to the designated remote, then scrape the source
      address off the socket.  We are careful to select the correct network
      namespace when setting up the temporary UDP socket.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2e738fdc
    • T
      SUNRPC: Move clnt->cl_server into struct rpc_xprt · 4e0038b6
      Trond Myklebust 提交于
      When the cl_xprt field is updated, the cl_server field will also have
      to change.  Since the contents of cl_server follow the remote endpoint
      of cl_xprt, just move that field to the rpc_xprt.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      [ cel: simplify check_gss_callback_principal(), whitespace changes ]
      [ cel: forward ported to 3.4 ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4e0038b6
    • T
      SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field · 2446ab60
      Trond Myklebust 提交于
      A migration event will replace the rpc_xprt used by an rpc_clnt.  To
      ensure this can be done safely, all references to cl_xprt must now use
      a form of rcu_dereference().
      
      Special care is taken with rpc_peeraddr2str(), which returns a pointer
      to memory whose lifetime is the same as the rpc_xprt.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      [ cel: fix lockdep splats and layering violations ]
      [ cel: forward ported to 3.4 ]
      [ cel: remove rpc_max_reqs(), add rpc_net_ns() ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2446ab60
  2. 02 3月, 2012 3 次提交
  3. 28 2月, 2012 1 次提交
    • S
      SUNRPC: move waitq from RPC pipe to RPC inode · 591ad7fe
      Stanislav Kinsbursky 提交于
      Currently, wait queue, used for polling of RPC pipe changes from user-space,
      is a part of RPC pipe. But the pipe data itself can be released on NFS umount
      prior to dentry-inode pair, connected to it (is case of this pair is open by
      some process).
      This is not a problem for almost all pipe users, because all PipeFS file
      operations checks pipe reference prior to using it.
      Except evenfd. This thing registers itself with "poll" file operation and thus
      has a reference to pipe wait queue. This leads to oopses on destroying eventfd
      after NFS umount (like rpc_idmapd do) since not pipe data left to the point
      already.
      The solution is to wait queue from pipe data to internal RPC inode data. This
      looks more logical, because this wiat queue used only for user-space processes,
      which already holds inode reference.
      
      Note: upcalls have to get pipe->dentry prior to dereferecing wait queue to make
      sure, that mount point won't disappear from underneath us.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      591ad7fe
  4. 18 2月, 2012 1 次提交
  5. 17 2月, 2012 2 次提交
    • C
      SUNRPC: Use KERN_DEFAULT for debugging printk's · dbb9c2a2
      Chuck Lever 提交于
      Our dprintk() debugging facility doesn't specify any verbosity level
      for it's printk() calls, but it should.
      
      The default verbosity for printk's is KERN_DEFAULT.  You might argue
      that these are debugging printk's and thus the verbosity should be
      KERN_DEBUG.  That would mean that to see NFS and SUNRPC debugging
      output an admin would also have to boost the syslog verbosity, which
      would be insufferably noisy.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      dbb9c2a2
    • A
      SUNRPC: add sending,pending queue and max slot to xprt stats · 15a45206
      Andy Adamson 提交于
      With static RPC slots, the xprt backlog queue stats were useful in showing
      when the transport (TCP) was starved by lack of RPC slots. The new dynamic
      RPC slot code, commit d9ba131d, always
      provides an RPC slot and so only uses the xprt backlog queue when the
      tcp_max_slot_table_entries value has been hit or when an allocation error
      occurs. All requests are now placed on the xprt sending or pending queue which
      need to be monitored for debugging.
      
      The max_slot stat shows the maximum number of dynamic RPC slots reached which is
      useful when debugging performance issues.
      
      Add the new fields at the end of the mountstats xprt stanza so that mountstats
      outputs the previous correct values and ignores the new fields. Bump
      NFS_IOSTATS_VERS.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      15a45206
  6. 15 2月, 2012 7 次提交
  7. 07 2月, 2012 2 次提交
  8. 01 2月, 2012 19 次提交