1. 01 2月, 2012 6 次提交
  2. 13 1月, 2012 1 次提交
  3. 10 1月, 2012 1 次提交
    • T
      NFSv4: Change the default setting of the nfs4_disable_idmapping parameter · 074b1d12
      Trond Myklebust 提交于
      Now that the use of numeric uids/gids is officially sanctioned in
      RFC3530bis, it is time to change the default here to 'enabled'.
      
      By doing so, we ensure that NFSv4 copies the behaviour of NFSv3 when we're
      using the default AUTH_SYS authentication (i.e. when the client uses the
      numeric uids/gids as authentication tokens), so that when new files are
      created, they will appear to have the correct user/group.
      It also fixes a number of backward compatibility issues when migrating
      from NFSv3 to NFSv4 on a platform where the server uses different uid/gid
      mappings than the client.
      
      Note also that this setting has been successfully tested against servers
      that do not support numeric uids/gids at several Connectathon/Bakeathon
      events at this point, and the fall back to using string names/groups has
      been shown to work well in all those test cases.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      074b1d12
  4. 06 1月, 2012 1 次提交
    • C
      NFS: Cache state owners after files are closed · 0aaaf5c4
      Chuck Lever 提交于
      Servers have a finite amount of memory to store NFSv4 open and lock
      owners.  Moreover, servers may have a difficult time determining when
      they can reap their state owner table, thanks to gray areas in the
      NFSv4 protocol specification.  Thus clients should be careful to reuse
      state owners when possible.
      
      Currently Linux is not too careful.  When a user has closed all her
      files on one mount point, the state owner's reference count goes to
      zero, and it is released.  The next OPEN allocates a new one.  A
      workload that serially opens and closes files can run through a large
      number of open owners this way.
      
      When a state owner's reference count goes to zero, slap it onto a free
      list for that nfs_server, with an expiry time.  Garbage collect before
      looking for a state owner.  This makes state owners for active users
      available for re-use.
      
      Now that there can be unused state owners remaining at umount time,
      purge the state owner free list when a server is destroyed.  Also be
      sure not to reclaim unused state owners during state recovery.
      
      This change has benefits for the client as well.  For some workloads,
      this approach drops the number of OPEN_CONFIRM calls from the same as
      the number of OPEN calls, down to just one.  This reduces wire traffic
      and thus open(2) latency.  Before this patch, untarring a kernel
      source tarball shows the OPEN_CONFIRM call counter steadily increasing
      through the test.  With the patch, the OPEN_CONFIRM count remains at 1
      throughout the entire untar.
      
      As long as the expiry time is kept short, I don't think garbage
      collection should be terribly expensive, although it does bounce the
      clp->cl_lock around a bit.
      
      [ At some point we should rationalize the use of the nfs_server
      ->destroy method. ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      [Trond: Fixed a garbage collection race and a few efficiency issues]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0aaaf5c4
  5. 05 1月, 2012 1 次提交
  6. 21 10月, 2011 1 次提交
  7. 19 10月, 2011 1 次提交
  8. 12 10月, 2011 1 次提交
  9. 01 8月, 2011 3 次提交
  10. 15 7月, 2011 1 次提交
  11. 13 7月, 2011 2 次提交
  12. 30 5月, 2011 1 次提交
  13. 12 3月, 2011 6 次提交
  14. 26 1月, 2011 1 次提交
  15. 07 1月, 2011 6 次提交
    • C
      NFS: Move cl_delegations to the nfs_server struct · d3978bb3
      Chuck Lever 提交于
      Delegations are per-inode, not per-nfs_client.  When a server file
      system is migrated, delegations on the client must be moved from the
      source to the destination nfs_server.  Make it easier to manage a
      mount point's delegation list across a migration event by moving the
      list to the nfs_server struct.
      
      Clean up: I added documenting comments to public functions I changed
      in this patch.  For consistency I added comments to all the other
      public functions in fs/nfs/delegation.c.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d3978bb3
    • C
      NFS: Allow walking nfs_client.cl_superblocks list outside client.c · fca5238e
      Chuck Lever 提交于
      We're about to move some fields from struct nfs_client to struct
      nfs_server.  There is a many-to-one relationship between nfs_servers
      and nfs_clients.  After these fields are moved to the nfs_server
      struct, to visit all of the data in these fields that is owned by one
      nfs_client, code will need to visit each nfs_server on the
      cl_superblocks list for that nfs_client.
      
      To serialize changes to the cl_superblocks list during these little
      expeditions, protect the list with RCU.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fca5238e
    • F
      pnfs: layout roc code · f7e8917a
      Fred Isaman 提交于
      A layout can request return-on-close.  How this interacts with the
      forgetful model of never sending LAYOUTRETURNS is a bit ambiguous.
      We forget any layouts marked roc, and wait for them to be completely
      forgotten before continuing with the close.  In addition, to compensate
      for races with any inflight LAYOUTGETs, and the fact that we do not get
      any layout stateid back from the server, we set the barrier to the worst
      case scenario of current_seqid + number of outstanding LAYOUTGETS.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f7e8917a
    • A
      NFS refactor nfs_find_client and reference client across callback processing · c36fca52
      Andy Adamson 提交于
      Fixes a bug where the nfs_client could be freed during callback processing.
      Refactor nfs_find_client to use minorversion specific means to locate the
      correct nfs_client structure.
      
      In the NFS layer, V4.0 clients are found using the callback_ident field in the
      CB_COMPOUND header.  V4.1 clients are found using the sessionID in the
      CB_SEQUENCE operation which is also compared against the sessionID associated
      with the back channel thread after a successful CREATE_SESSION.
      
      Each of these methods finds the one an only nfs_client associated
      with the incoming callback request - so nfs_find_client_next is not needed.
      
      In the RPC layer, the pg_authenticate call needs to find the nfs_client. For
      the v4.0 callback service, the callback identifier has not been decoded so a
      search by address, version, and minorversion is used.  The sessionid for the
      sessions based callback service has (usually) not been set for the
      pg_authenticate on a CB_NULL call which can be sent prior to the return
      of a CREATE_SESSION call, so the sessionid associated with the back channel
      thread is not used to find the client in pg_authenticate for CB_NULL calls.
      
      Pass the referenced nfs_client to each CB_COMPOUND operation being proceesed
      via the new cb_process_state structure. The reference is held across
      cb_compound processing.
      
      Use the new cb_process_state struct to move the NFS4ERR_RETRY_UNCACHED_REP
      processing from process_op into nfs4_callback_sequence where it belongs.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c36fca52
    • A
      NFS implement v4.0 callback_ident · f4eecd5d
      Andy Adamson 提交于
      Use the small id to pointer translator service to provide a unique callback
      identifier per SETCLIENTID call used to identify the v4.0 callback service
      associated with the clientid.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f4eecd5d
    • A
      NFS do not clear minor version at nfs_client free · ea005281
      Andy Adamson 提交于
      Resetting the client minor version operations causes nfs4_destroy_callback
      to fail to shutdown the NFSv4.1 callback service.
      
      There is no reason to reset the client minorversion operations when the
      nfs_client struct is being freed.
      
      Remove the minorverion reset and rename the function.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ea005281
  16. 25 10月, 2010 4 次提交
  17. 24 10月, 2010 2 次提交
    • B
      NFS: Readdir plus in v4 · 82f2e547
      Bryan Schumaker 提交于
      By requsting more attributes during a readdir, we can mimic the readdir plus
      operation that was in NFSv3.
      
      To test, I ran the command `ls -lU --color=none` on directories with various
      numbers of files.  Without readdir plus, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.153s | 0m00.589s | 0m05.601s | 0m56.691s | 9m59.128s
      user    | 0m00.007s | 0m00.007s | 0m00.077s | 0m00.703s | 0m06.800s
      sys     | 0m00.010s | 0m00.070s | 0m00.633s | 0m06.423s | 1m10.005s
      access  | 3         | 1         | 1         | 4         | 31
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 104       | 1,003     | 10,003    | 100,003   | 1,000,003
      readdir | 2         | 16        | 158       | 1,575     | 15,749
      total   | 111       | 1,021     | 10,163    | 101,583   | 1,015,784
      
      With readdir plus enabled, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.115s | 0m00.206s | 0m01.079s | 0m12.521s | 2m07.528s
      user    | 0m00.003s | 0m00.003s | 0m00.040s | 0m00.290s | 0m03.296s
      sys     | 0m00.007s | 0m00.020s | 0m00.120s | 0m01.357s | 0m17.556s
      access  | 3         | 1         | 1         | 1         | 7
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 4         | 3         | 3         | 3         | 3
      readdir | 6         | 62        | 630       | 6,300     | 62,993
      total   | 15        | 67        | 635       | 6,305     | 63,004
      
      Readdir plus disabled has about a 16x increase in the number of rpc calls and
      is 4 - 5 times slower on large directories.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      82f2e547
    • B
      NFS: readdir with vmapped pages · 56e4ebf8
      Bryan Schumaker 提交于
      We can use vmapped pages to read more information from the network at once.
      This will reduce the number of calls needed to complete a readdir.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      [trondmy: Added #include for linux/vmalloc.h> in fs/nfs/dir.c]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      56e4ebf8
  18. 02 10月, 2010 1 次提交