1. 20 11月, 2010 3 次提交
  2. 03 11月, 2010 1 次提交
  3. 31 10月, 2010 2 次提交
  4. 28 10月, 2010 1 次提交
  5. 25 10月, 2010 1 次提交
  6. 21 10月, 2010 10 次提交
  7. 05 10月, 2010 1 次提交
    • A
      fs/locks.c: prepare for BKL removal · b89f4321
      Arnd Bergmann 提交于
      This prepares the removal of the big kernel lock from the
      file locking code. We still use the BKL as long as fs/lockd
      uses it and ceph might sleep, but we can flip the definition
      to a private spinlock as soon as that's done.
      All users outside of fs/lockd get converted to use
      lock_flocks() instead of lock_kernel() where appropriate.
      
      Based on an earlier patch to use a spinlock from Matthew
      Wilcox, who has attempted this a few times before, the
      earliest patch from over 10 years ago turned it into
      a semaphore, which ended up being slower than the BKL
      and was subsequently reverted.
      
      Someone should do some serious performance testing when
      this becomes a spinlock, since this has caused problems
      before. Using a spinlock should be at least as good
      as the BKL in theory, but who knows...
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NMatthew Wilcox <willy@linux.intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Miklos Szeredi <mszeredi@suse.cz>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Sage Weil <sage@newdream.net>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-fsdevel@vger.kernel.org
      b89f4321
  8. 03 10月, 2010 1 次提交
    • J
      nfsd4: return expired on unfound stateid's · 33515142
      J. Bruce Fields 提交于
      Commit 78155ed7 "nfsd4: distinguish
      expired from stale stateids" attempted to distinguish expired and stale
      stateid's using time information that may not have been completely
      reliable, so I reverted it.
      
      That was throwing out the baby with the bathwater; we still do want to
      return expired, but let's do that using the simpler approach of just
      assuming any stateid is expired if it looks like it was given out by the
      current server instance, but we can't find it any more.
      
      This may help clients that are recovering from network partitions.
      Reported-by: NBian Naimeng <biannm@cn.fujitsu.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      33515142
  9. 02 10月, 2010 10 次提交
  10. 03 9月, 2010 1 次提交
  11. 27 8月, 2010 2 次提交
    • J
      nfsd4: fix downgrade/lock logic · 7d947842
      J. Bruce Fields 提交于
      If we already had a RW open for a file, and get a readonly open, we were
      piggybacking on the existing RW open.  That's inconsistent with the
      downgrade logic which blows away the RW open assuming you'll still have
      a readonly open.
      
      Also, make sure there is a readonly or writeonly open available for
      locking, again to prevent bad behavior in downgrade cases when any RW
      open may be lost.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      7d947842
    • J
      nfsd4: bad BUG() in preprocess_stateid_op · 30c0e1ef
      J. Bruce Fields 提交于
      It's OK for this function to return without setting filp--we do it in
      the special-stateid case.
      
      And there's a legitimate case where we can hit this, since we do permit
      reads on write-only stateid's.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      30c0e1ef
  12. 07 8月, 2010 1 次提交
  13. 30 7月, 2010 5 次提交
    • A
      gcc-4.6: nfsd: fix initialized but not read warnings · 69049961
      Andi Kleen 提交于
      Fixes at least one real minor bug: the nfs4 recovery dir sysctl
      would not return its status properly.
      
      Also I finished Al's 1e41568d ("Take ima_path_check() in nfsd
      past dentry_open() in nfsd_open()") commit, it moved the IMA
      code, but left the old path initializer in there.
      
      The rest is just dead code removed I think, although I was not
      fully sure about the "is_borc" stuff. Some more review
      would be still good.
      
      Found by gcc 4.6's new warnings.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      69049961
    • J
      nfsd4: share file descriptors between stateid's · f9d7562f
      J. Bruce Fields 提交于
      The vfs doesn't really allow us to "upgrade" a file descriptor from
      read-only to read-write, and our attempt to do so in nfs4_upgrade_open
      is ugly and incomplete.
      
      Move to a different scheme where we keep multiple opens, shared between
      open stateid's, in the nfs4_file struct.  Each file will be opened at
      most 3 times (for read, write, and read-write), and those opens will be
      shared between all clients and openers.  On upgrade we will do another
      open if necessary instead of attempting to upgrade an existing open.
      We keep count of the number of readers and writers so we know when to
      close the shared files.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f9d7562f
    • J
      nfsd4: fix openmode checking on IO using lock stateid · 02921914
      J. Bruce Fields 提交于
      It is legal to perform a write using the lock stateid that was
      originally associated with a read lock, or with a file that was
      originally opened for read, but has since been upgraded.
      
      So, when checking the openmode, check the mode associated with the
      open stateid from which the lock was derived.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      02921914
    • J
      nfsd4: miscellaneous process_open2 cleanup · 21fb4016
      J. Bruce Fields 提交于
      Move more work into helper functions.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      21fb4016
    • J
      nfsd4: don't pretend to support write delegations · c3e48080
      J. Bruce Fields 提交于
      The delegation code mostly pretends to support either read or write
      delegations.  However, correct support for write delegations would
      require, for example, breaking of delegations (and/or implementation of
      cb_getattr) on stat.  Currently all that stops us from handing out
      delegations is a subtle reference-counting issue.
      
      Avoid confusion by adding an earlier check that explicitly refuses write
      delegations.
      
      For now, though, I'm not going so far as to rip out existing
      half-support for write delegations, in case we get around to using that
      soon.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      c3e48080
  14. 23 7月, 2010 1 次提交
    • J
      nfsd4: fix v4 state shutdown error paths · 4ad9a344
      Jeff Layton 提交于
      If someone tries to shut down the laundry_wq while it isn't up it'll
      cause an oops.
      
      This can happen because write_ports can create a nfsd_svc before we
      really start the nfs server, and we may fail before the server is ever
      started.
      
      Also make sure state is shutdown on error paths in nfsd_svc().
      
      Use a common global nfsd_up flag instead of nfs4_init, and create common
      helper functions for nfsd start/shutdown, as there will be other work
      that we want done only when we the number of nfsd threads transitions
      between zero and nonzero.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      4ad9a344