1. 23 10月, 2008 10 次提交
  2. 05 10月, 2008 2 次提交
  3. 04 10月, 2008 1 次提交
    • J
      nfsd: common grace period control · af558e33
      J. Bruce Fields 提交于
      Rewrite grace period code to unify management of grace period across
      lockd and nfsd.  The current code has lockd and nfsd cooperate to
      compute a grace period which is satisfactory to them both, and then
      individually enforce it.  This creates a slight race condition, since
      the enforcement is not coordinated.  It's also more complicated than
      necessary.
      
      Here instead we have lockd and nfsd each inform common code when they
      enter the grace period, and when they're ready to leave the grace
      period, and allow normal locking only after both of them are ready to
      leave.
      
      We also expect the locks_start_grace()/locks_end_grace() interface here
      to be simpler to build on for future cluster/high-availability work,
      which may require (for example) putting individual filesystems into
      grace, or enforcing grace periods across multiple cluster nodes.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      af558e33
  4. 30 9月, 2008 12 次提交
  5. 02 9月, 2008 2 次提交
  6. 09 8月, 2008 1 次提交
    • A
      [NFSD] uninline nfsd4_op_name() · f1c7f79b
      Adrian Bunk 提交于
      There doesn't seem to be a compelling reason why nfsd4_op_name() is
      marked as "inline":
      
      It's only used in a dprintk(), and as long as it has only one caller
      non-ancient gcc versions anyway inline it automatically.
      
      This patch fixes the following compile error with gcc 3.4:
      
        ...
          CC      fs/nfsd/nfs4proc.o
        nfs4proc.c: In function `nfsd4_proc_compound':
        nfs4proc.c:854: sorry, unimplemented: inlining failed in call to
        nfs4proc.c:897: sorry, unimplemented: called from here
        make[3]: *** [fs/nfsd/nfs4proc.o] Error 1
      Reported-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      [ Also made it "const char *"  - Linus]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f1c7f79b
  7. 31 7月, 2008 1 次提交
    • J
      fs/nfsd/export.c: Adjust error handling code involving auth_domain_put · 53e6d8d1
      Julia Lawall 提交于
      Once clp is assigned, it never becomes NULL, so we can make a label for it
      in the error handling code.  Because the call to path_lookup follows the
      call to auth_domain_find, its error handling code should jump to this new
      label.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r@
      expression x,E;
      statement S;
      position p1,p2,p3;
      @@
      
      (
      if ((x = auth_domain_find@p1(...)) == NULL || ...) S
      |
      x = auth_domain_find@p1(...)
      ... when != x
      if (x == NULL || ...) S
      )
      <...
      if@p3 (...) { ... when != auth_domain_put(x)
                        when != if (x) { ... auth_domain_put(x); ...}
          return@p2 ...;
      }
      ...>
      (
      return x;
      |
      return 0;
      |
      x = E
      |
      E = x
      |
      auth_domain_put(x)
      )
      
      @exists@
      position r.p1,r.p2,r.p3;
      expression x;
      int ret != 0;
      statement S;
      @@
      
      * x = auth_domain_find@p1(...)
        <...
      * if@p3 (...)
        S
        ...>
      * return@p2 \(NULL\|ret\);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      53e6d8d1
  8. 27 7月, 2008 3 次提交
  9. 26 7月, 2008 1 次提交
  10. 19 7月, 2008 2 次提交
  11. 16 7月, 2008 1 次提交
  12. 10 7月, 2008 1 次提交
    • O
      rpc: bring back cl_chatty · b6b6152c
      Olga Kornievskaia 提交于
      The cl_chatty flag alows us to control whether a given rpc client leaves
      
      	"server X not responding, timed out"
      
      messages in the syslog.  Such messages make sense for ordinary nfs
      clients (where an unresponsive server means applications on the
      mountpoint are probably hanging), but not for the callback client (which
      can fail more commonly, with the only result just of disabling some
      optimizations).
      
      Previously cl_chatty was removed, do to lack of users; reinstate it, and
      use it for the nfsd's callback client.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b6b6152c
  13. 08 7月, 2008 2 次提交
    • B
      nfsd: take file and mnt write in nfs4_upgrade_open · e518f056
      Benny Halevy 提交于
      testing with newpynfs revealed this warning:
      Jul  3 07:32:50 buml kernel: writeable file with no mnt_want_write()
      Jul  3 07:32:50 buml kernel: ------------[ cut here ]------------
      Jul  3 07:32:50 buml kernel: WARNING: at /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/include/linux/fs.h:855 drop_file_write_access+0x6b/0x7e()
      Jul  3 07:32:50 buml kernel: Modules linked in: nfsd auth_rpcgss exportfs nfs lockd nfs_acl sunrpc
      Jul  3 07:32:50 buml kernel: Call Trace:
      Jul  3 07:32:50 buml kernel: 6eaadc88:  [<6002f471>] warn_on_slowpath+0x54/0x8e
      Jul  3 07:32:50 buml kernel: 6eaadcc8:  [<601b790d>] printk+0xa0/0x793
      Jul  3 07:32:50 buml kernel: 6eaadd38:  [<601b6205>] __mutex_lock_slowpath+0x1db/0x1ea
      Jul  3 07:32:50 buml kernel: 6eaadd68:  [<7107d4d5>] nfs4_preprocess_seqid_op+0x2a6/0x31c [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaadda8:  [<60078dc9>] drop_file_write_access+0x6b/0x7e
      Jul  3 07:32:50 buml kernel: 6eaaddc8:  [<710804e4>] nfsd4_open_downgrade+0x114/0x1de [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaade08:  [<71076215>] nfsd4_proc_compound+0x1ba/0x2dc [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaade48:  [<71068221>] nfsd_dispatch+0xe5/0x1c2 [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaade88:  [<71312f81>] svc_process+0x3fd/0x714 [sunrpc]
      Jul  3 07:32:50 buml kernel: 6eaadea8:  [<60039a81>] kernel_sigprocmask+0xf3/0x100
      Jul  3 07:32:50 buml kernel: 6eaadee8:  [<7106874b>] nfsd+0x182/0x29b [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaadf48:  [<60021cc9>] run_kernel_thread+0x41/0x4a
      Jul  3 07:32:50 buml kernel: 6eaadf58:  [<710685c9>] nfsd+0x0/0x29b [nfsd]
      Jul  3 07:32:50 buml kernel: 6eaadf98:  [<60021cb0>] run_kernel_thread+0x28/0x4a
      Jul  3 07:32:50 buml kernel: 6eaadfc8:  [<60013829>] new_thread_handler+0x72/0x9c
      Jul  3 07:32:50 buml kernel:
      Jul  3 07:32:50 buml kernel: ---[ end trace 2426dd7cb2fba3bf ]---
      
      Bruce Fields suggested this (Thanks!):
      maybe we need to be doing a mnt_want_write on open_upgrade and mnt_put_write on downgrade?
      
      This patch adds a call to mnt_want_write and file_take_write (which is
      doing the actual work).
      
      The counter-calls mnt_drop_write a file_release_write are now being properly
      called by drop_file_write_access in the exact path printed by the warning
      above.
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      e518f056
    • J
      nfsd: document open share bit tracking · 4f83aa30
      J. Bruce Fields 提交于
      It's not immediately obvious from the code why we're doing this.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Benny Halevy <bhalevy@panasas.com>
      4f83aa30
  14. 05 7月, 2008 1 次提交