1. 07 8月, 2010 1 次提交
  2. 31 7月, 2010 1 次提交
  3. 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
  4. 28 7月, 2010 1 次提交
    • J
      nfsd: bypass readahead cache when have struct file · fa0a2126
      J. Bruce Fields 提交于
      The readahead cache compensates for the fact that the NFS server
      currently does an open and close on every IO operation in the NFSv2 and
      NFSv3 case.
      
      In the NFSv4 case we have long-lived struct files associated with client
      opens, so there's no need for this.  In fact, concurrent IO's using
      trying to modify the same file->f_ra may cause problems.
      
      So, don't bother with the readahead cache in that case.
      
      Note eventually we'll likely do this in the v2/v3 case as well by
      keeping a cache of struct files instead of struct file_ra_state's.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      fa0a2126
  5. 23 7月, 2010 8 次提交
  6. 08 7月, 2010 1 次提交
    • C
      NFSD: Fill in WCC data for REMOVE, RMDIR, MKNOD, and MKDIR · 43a9aa64
      Chuck Lever 提交于
      Some well-known NFSv3 clients drop their directory entry caches when
      they receive replies with no WCC data.  Without this data, they
      employ extra READ, LOOKUP, and GETATTR requests to ensure their
      directory entry caches are up to date, causing performance to suffer
      needlessly.
      
      In order to return WCC data, our server has to have both the pre-op
      and the post-op attribute data on hand when a reply is XDR encoded.
      The pre-op data is filled in when the incoming fh is locked, and the
      post-op data is filled in when the fh is unlocked.
      
      Unfortunately, for REMOVE, RMDIR, MKNOD, and MKDIR, the directory fh
      is not unlocked until well after the reply has been XDR encoded.  This
      means that encode_wcc_data() does not have wcc_data for the parent
      directory, so none is returned to the client after these operations
      complete.
      
      By unlocking the parent directory fh immediately after the internal
      operations for each NFS procedure is complete, the post-op data is
      filled in before XDR encoding starts, so it can be returned to the
      client properly.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      43a9aa64
  7. 07 7月, 2010 1 次提交
  8. 25 6月, 2010 2 次提交
  9. 23 6月, 2010 4 次提交
  10. 01 6月, 2010 4 次提交
  11. 25 5月, 2010 1 次提交
  12. 22 5月, 2010 2 次提交
  13. 19 5月, 2010 2 次提交
    • J
      Revert "nfsd4: distinguish expired from stale stateids" · e4e83ea4
      J. Bruce Fields 提交于
      This reverts commit 78155ed7.
      
      We're depending here on the boot time that we use to generate the
      stateid being monotonic, but get_seconds() is not necessarily.
      
      We still depend at least on boot_time being different every time, but
      that is a safer bet.
      
      We have a few reports of errors that might be explained by this problem,
      though we haven't been able to confirm any of them.
      
      But the minor gain of distinguishing expired from stale errors seems not
      worth the risk.
      
      Conflicts:
      
      	fs/nfsd/nfs4state.c
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      e4e83ea4
    • P
      nfsd: safer initialization order in find_file() · 47cee541
      Pavel Emelyanov 提交于
      The alloc_init_file() first adds a file to the hash and then
      initializes its fi_inode, fi_id and fi_had_conflict.
      
      The uninitialized fi_inode could thus be erroneously checked by
      the find_file(), so move the hash insertion lower.
      
      The client_mutex should prevent this race in practice; however, we
      eventually hope to make less use of the client_mutex, so the ordering
      here is an accident waiting to happen.
      
      I didn't find whether the same can be true for two other fields,
      but the common sense tells me it's better to initialize an object
      before putting it into a global hash table :)
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      47cee541
  14. 18 5月, 2010 1 次提交
  15. 15 5月, 2010 1 次提交
  16. 14 5月, 2010 1 次提交
  17. 13 5月, 2010 4 次提交