An error occurred fetching the project authors.
  1. 23 Jun, 2008 2 commits
    • Miklos Szeredi's avatar
      nfsd: rename MAY_ flags · 8837abca
      Miklos Szeredi authored
      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: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      8837abca
    • Jeff Layton's avatar
      knfsd: clean up nfsd filesystem interfaces · 3dd98a3b
      Jeff Layton authored
      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: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      3dd98a3b
  2. 18 May, 2008 1 commit
  3. 25 Apr, 2008 1 commit
    • J. Bruce Fields's avatar
      locks: don't call ->copy_lock methods on return of conflicting locks · 1a747ee0
      J. Bruce Fields authored
      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: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      1a747ee0
  4. 23 Apr, 2008 5 commits
  5. 19 Apr, 2008 1 commit
  6. 15 Feb, 2008 2 commits
  7. 01 Feb, 2008 12 commits
  8. 09 Oct, 2007 8 commits
    • Pavel Emelyanov's avatar
      Cleanup macros for distinguishing mandatory locks · a16877ca
      Pavel Emelyanov authored
      The combination of S_ISGID bit set and S_IXGRP bit unset is used to mark the
      inode as "mandatory lockable" and there's a macro for this check called
      MANDATORY_LOCK(inode).  However, fs/locks.c and some filesystems still perform
      the explicit i_mode checking.  Besides, Andrew pointed out, that this macro is
      buggy itself, as it dereferences the inode arg twice.
      
      Convert this macro into static inline function and switch its users to it,
      making the code shorter and more readable.
      
      The __mandatory_lock() helper is to be used in places where the IS_MANDLOCK()
      for superblock is already known to be true.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@sandia.gov>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a16877ca
    • J. Bruce Fields's avatar
      knfsd: nfsv4 delegation recall should take reference on client · cfdcad4d
      J. Bruce Fields authored
      It's not enough to take a reference on the delegation object itself; we
      need to ensure that the rpc_client won't go away just as we're about to
      make an rpc call.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      cfdcad4d
    • J. Bruce Fields's avatar
      knfsd: don't shutdown callbacks until nfsv4 client is freed · 1b1a9b31
      J. Bruce Fields authored
      If a callback still holds a reference on the client, then it may be
      about to perform an rpc call, so it isn't safe to call rpc_shutdown().
      (Though rpc_shutdown() does wait for any outstanding rpc's, it can't
      know if a new rpc is about to be issued with that client.)
      
      So, wait to shutdown the rpc_client until the reference count on the
      client has gone to zero.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      1b1a9b31
    • J. Bruce Fields's avatar
      knfsd: let nfsd manage timing out its own leases · 0272e1fd
      J. Bruce Fields authored
      Currently there's a race that can cause an oops in generic_setlease.
      
      (In detail: nfsd, when it removes a lease, does so by calling
      vfs_setlease() with F_UNLCK and a pointer to the fl_flock field, which
      in turn points to nfsd's existing lease; but the first thing the
      setlease code does is call time_out_leases().  If the lease happens to
      already be beyond the lease break time, that will free the lease and (in
      nfsd's release_private callback) set fl_flock to NULL, leading to a NULL
      deference soon after in vfs_setlease().)
      
      There are probably other things to fix here too, but it seems inherently
      racy to allow either locks.c or nfsd to time out this lease.  Instead
      just set the fl_break_time to 0 (preventing locks.c from ever timing out
      this lock) and leave it up to nfsd's laundromat thread to deal with it.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      0272e1fd
    • J. Bruce Fields's avatar
      knfsd: remove code duplication in nfsd4_setclientid() · c175b83c
      J. Bruce Fields authored
      Each branch of this if-then-else has a bunch of duplicated code that we
      could just put at the end.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      c175b83c
    • J. Bruce Fields's avatar
      knfsd: move nfsv4 slab creation/destruction to module init/exit · e8ff2a84
      J. Bruce Fields authored
      We have some slabs that the nfs4 server uses to store state objects.
      We're currently creating and destroying those slabs whenever the server
      is brought up or down.  That seems excessive; may as well just do that
      in module initialization and exit.
      
      Also add some minor header cleanup.  (Thanks to Andrew Morton for that
      and a compile fix.)
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      e8ff2a84
    • J. Bruce Fields's avatar
      knfsd: demote some printk()s to dprintk()s · 2fdada03
      J. Bruce Fields authored
      To quote a recent mail from Andrew Morton:
      
      	Look: if there's a way in which an unprivileged user can trigger
      	a printk we fix it, end of story.
      
      OK.  I assume that goes double for printk()s that might be triggered by
      random hosts on the internet.  So, disable some printk()s that look like
      they could be triggered by malfunctioning or malicious clients.  For
      now, just downgrade them to dprintk()s.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      2fdada03
    • J. Bruce Fields's avatar
      knfsd: cleanup of nfsd4 cmp_* functions · 599e0a22
      J. Bruce Fields authored
      Benny Halevy suggested renaming cmp_* to same_* to make the meaning of
      the return value clearer.
      
      Fix some nearby style deviations while we're at it, including a small
      swath of creative indentation in nfs4_preprocess_seqid_op().
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      599e0a22
  9. 20 Jul, 2007 1 commit
    • Paul Mundt's avatar
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt authored
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      20c2df83
  10. 18 Jul, 2007 1 commit
    • J. Bruce Fields's avatar
      locks: rename lease functions to reflect locks.c conventions · a9933cea
      J. Bruce Fields authored
      We've been using the convention that vfs_foo is the function that calls
      a filesystem-specific foo method if it exists, or falls back on a
      generic method if it doesn't; thus vfs_foo is what is called when some
      other part of the kernel (normally lockd or nfsd) wants to get a lock,
      whereas foo is what filesystems call to use the underlying local
      functionality as part of their lock implementation.
      
      So rename setlease to vfs_setlease (which will call a
      filesystem-specific setlease after a later patch) and __setlease to
      setlease.
      
      Also, vfs_setlease need only be GPL-exported as long as it's only needed
      by lockd and nfsd.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      a9933cea
  11. 17 Jul, 2007 3 commits
  12. 11 Jul, 2007 1 commit
  13. 09 May, 2007 1 commit
  14. 07 May, 2007 1 commit
    • Marc Eshel's avatar
      nfsd4: Convert NFSv4 to new lock interface · fd85b817
      Marc Eshel authored
      Convert NFSv4 to the new lock interface.  We don't define any callback for now,
      so we're not taking advantage of the asynchronous feature--that's less critical
      for the multi-threaded nfsd then it is for the single-threaded lockd.  But this
      does allow a cluster filesystems to export cluster-coherent locking to NFS.
      
      Note that it's cluster filesystems that are the issue--of the filesystems that
      define lock methods (nfs, cifs, etc.), most are not exportable by nfsd.
      Signed-off-by: default avatarMarc Eshel <eshel@almaden.ibm.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      fd85b817