1. 01 8月, 2011 2 次提交
  2. 15 7月, 2011 1 次提交
  3. 13 7月, 2011 2 次提交
  4. 30 5月, 2011 1 次提交
  5. 12 3月, 2011 6 次提交
  6. 26 1月, 2011 1 次提交
  7. 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
  8. 25 10月, 2010 4 次提交
  9. 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
  10. 02 10月, 2010 1 次提交
  11. 23 9月, 2010 1 次提交
    • S
      nfs: introduce mount option '-olocal_lock' to make locks local · 5eebde23
      Suresh Jayaraman 提交于
      NFS clients since 2.6.12 support flock locks by emulating fcntl byte-range
      locks. Due to this, some windows applications which seem to use both flock
      (share mode lock mapped as flock by Samba) and fcntl locks sequentially on
      the same file, can't lock as they falsely assume the file is already locked.
      The problem was reported on a setup with windows clients accessing excel files
      on a Samba exported share which is originally a NFS mount from a NetApp filer.
      
      Older NFS clients (< 2.6.12) did not see this problem as flock locks were
      considered local. To support legacy flock behavior, this patch adds a mount
      option "-olocal_lock=" which can take the following values:
      
         'none'  		- Neither flock locks nor POSIX locks are local
         'flock' 		- flock locks are local
         'posix' 		- fcntl/POSIX locks are local
         'all'		- Both flock locks and POSIX locks are local
      
      Testing:
      
         - This patch was tested by using -olocal_lock option with different values
           and the NLM calls were noted from the network packet captured.
      
           'none'  - NLM calls were seen during both flock() and fcntl(), flock lock
         	       was granted, fcntl was denied
           'flock' - no NLM calls for flock(), NLM call was seen for fcntl(),
         	       granted
           'posix' - NLM call was seen for flock() - granted, no NLM call for fcntl()
           'all'   - no NLM calls were seen during both flock() and fcntl()
      
         - No bugs were seen during NFSv4 locking/unlocking in general and NFSv4
           reboot recovery.
      
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5eebde23
  12. 13 9月, 2010 1 次提交
  13. 23 6月, 2010 3 次提交
  14. 15 5月, 2010 2 次提交
  15. 23 4月, 2010 1 次提交
  16. 12 4月, 2010 1 次提交
    • T
      NFSv4: fix delegated locking · 0df5dd4a
      Trond Myklebust 提交于
      Arnaud Giersch reports that NFSv4 locking is broken when we hold a
      delegation since commit 8e469ebd (NFSv4:
      Don't allow posix locking against servers that don't support it).
      
      According to Arnaud, the lock succeeds the first time he opens the file
      (since we cannot do a delegated open) but then fails after we start using
      delegated opens.
      
      The following patch fixes it by ensuring that locking behaviour is
      governed by a per-filesystem capability flag that is initially set, but
      gets cleared if the server ever returns an OPEN without the
      NFS4_OPEN_RESULT_LOCKTYPE_POSIX flag being set.
      Reported-by: NArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@kernel.org
      0df5dd4a
  17. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  18. 03 3月, 2010 1 次提交
  19. 06 12月, 2009 1 次提交
  20. 07 10月, 2009 1 次提交
  21. 24 9月, 2009 1 次提交
    • D
      NFS: Propagate 'fsc' mount option through automounts · 2df54806
      David Howells 提交于
      Propagate the NFS 'fsc' mount option through NFS automounts of various types.
      
      This is now required as commit:
      
      	commit c02d7adf
      	Author: Trond Myklebust <Trond.Myklebust@netapp.com>
      	Date:   Mon Jun 22 15:09:14 2009 -0400
      
      	NFSv4: Replace nfs4_path_walk() with VFS path lookup in a private namespace
      
      uses VFS-driven automounting to reach all submounts barring the root, thus
      preventing fscaching from being enabled on any submount other than the root.
      
      This patch gets around that by propagating the NFS_OPTION_FSCACHE flag across
      automounts.  If a uniquifier is supplied to a mount then this is propagated to
      all automounts of that mount too.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      [Trond: Fixed up the definition of nfs_fscache_get_super_cookie for the
              case of #undef CONFIG_NFS_FSCACHE]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2df54806