1. 04 4月, 2009 11 次提交
  2. 19 3月, 2009 16 次提交
  3. 28 1月, 2009 1 次提交
    • J
      nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found · fa82a491
      Jeff Layton 提交于
      nfsd4_lockt does a search for a lockstateowner when building the lock
      struct to test. If one is found, it'll set fl_owner to it. Regardless of
      whether that happens, it'll also set fl_lmops. Given that this lock is
      basically a "lightweight" lock that's just used for checking conflicts,
      setting fl_lmops is probably not appropriate for it.
      
      This behavior exposed a bug in DLM's GETLK implementation where it
      wasn't clearing out the fields in the file_lock before filling in
      conflicting lock info. While we were able to fix this in DLM, it
      still seems pointless and dangerous to set the fl_lmops this way
      when we may have a NULL lockstateowner.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@pig.fieldses.org>
      fa82a491
  4. 08 1月, 2009 2 次提交
  5. 07 1月, 2009 1 次提交
  6. 24 12月, 2008 2 次提交
  7. 25 11月, 2008 1 次提交
  8. 31 10月, 2008 1 次提交
  9. 23 10月, 2008 1 次提交
  10. 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
  11. 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
  12. 24 6月, 2008 1 次提交