1. 19 3月, 2009 15 次提交
  2. 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
  3. 08 1月, 2009 2 次提交
  4. 07 1月, 2009 1 次提交
  5. 24 12月, 2008 2 次提交
  6. 25 11月, 2008 1 次提交
  7. 31 10月, 2008 1 次提交
  8. 23 10月, 2008 1 次提交
  9. 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
  10. 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
  11. 24 6月, 2008 2 次提交
    • M
      nfsd: rename MAY_ flags · 8837abca
      Miklos Szeredi 提交于
      Rename nfsd_permission() specific MAY_* flags to NFSD_MAY_* to make it
      clear, that these are not used outside nfsd, and to avoid name and
      number space conflicts with the VFS.
      
      [comment from hch: rename MAY_READ, MAY_WRITE and MAY_EXEC as well]
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      8837abca
    • J
      knfsd: clean up nfsd filesystem interfaces · 3dd98a3b
      Jeff Layton 提交于
      Several of the nfsd filesystem interfaces allow changes to parameters
      that don't have any effect on a running nfsd service. They are only ever
      checked when nfsd is started. This patch fixes it so that changes to
      those procfiles return -EBUSY if nfsd is already running to make it
      clear that changes on the fly don't work.
      
      The patch should also close some relatively harmless races between
      changing the info in those interfaces and starting nfsd, since these
      variables are being moved under the protection of the nfsd_mutex.
      
      Finally, the nfsv4recoverydir file always returns -EINVAL if read. This
      patch fixes it to return the recoverydir path as expected.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      3dd98a3b
  12. 19 5月, 2008 1 次提交
  13. 26 4月, 2008 1 次提交
    • J
      locks: don't call ->copy_lock methods on return of conflicting locks · 1a747ee0
      J. Bruce Fields 提交于
      The file_lock structure is used both as a heavy-weight representation of
      an active lock, with pointers to reference-counted structures, etc., and
      as a simple container for parameters that describe a file lock.
      
      The conflicting lock returned from __posix_lock_file is an example of
      the latter; so don't call the filesystem or lock manager callbacks when
      copying to it.  This also saves the need for an unnecessary
      locks_init_lock in the nfsv4 server.
      
      Thanks to Trond for pointing out the error.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      1a747ee0
  14. 24 4月, 2008 5 次提交
  15. 19 4月, 2008 1 次提交
  16. 15 2月, 2008 2 次提交
  17. 02 2月, 2008 1 次提交