1. 01 9月, 2011 3 次提交
  2. 28 8月, 2011 1 次提交
  3. 18 7月, 2011 2 次提交
  4. 16 7月, 2011 2 次提交
  5. 12 1月, 2011 2 次提交
  6. 18 12月, 2010 1 次提交
  7. 09 12月, 2010 1 次提交
    • N
      nfsd: Fix possible BUG_ON firing in set_change_info · c1ac3ffc
      Neil Brown 提交于
      If vfs_getattr in fill_post_wcc returns an error, we don't
      set fh_post_change.
      For NFSv4, this can result in set_change_info triggering a BUG_ON.
      i.e. fh_post_saved being zero isn't really a bug.
      
      So:
       - instead of BUGging when fh_post_saved is zero, just clear ->atomic.
       - if vfs_getattr fails in fill_post_wcc, take a copy of i_ctime anyway.
         This will be used i seg_change_info, but not overly trusted.
       - While we are there, remove the pointless 'if' statements in set_change_info.
         There is no harm setting all the values.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      c1ac3ffc
  8. 14 5月, 2010 1 次提交
  9. 20 4月, 2010 1 次提交
  10. 16 12月, 2009 1 次提交
  11. 15 12月, 2009 2 次提交
    • B
      nfsd: Move private headers to source directory · 9a74af21
      Boaz Harrosh 提交于
      Lots of include/linux/nfsd/* headers are only used by
      nfsd module. Move them to the source directory
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      9a74af21
    • B
      nfsd: Headers Independence and include cleanups · 72579ac9
      Boaz Harrosh 提交于
      * Add includes that are directly used by headers
      * Remove includes that are not needed
      
      These are the changes made:
      
      [xdr.h]
      struct nfsd_readdirres has an embedded struct readdir_cd from nfsd.h
      fixing that we can drop other includes
      
      [xdr4.h]
      embedded types defined both at state.h and nfsd.h
      
      [syscall.h]
      After export.h fix none of these stuff is needed.
      fix extra space in # include <> statement
      
      [stats.h]
      does not need <linux/nfs4.h> but was export to user-mode
      so I don't touch it
      
      [state.h]
      embedded types from nfsfh.h like struct knfsd_fh. bringing that
      eliminates the need for all other includes
      
      [nfsfh.h]
      directly manipulating types from sunrpc/svc.h.
      Removed Other unused headers.
      
      [nfsd.h]
      removed unused headers include
      
      [export.h]
      lots of sunrpc/svc.h types and a single prototype declaration
      with pointer from nfsfh.h, but all users of export.h do need
      nfsfh.h any way. remove now un-needed include.
      
      [const.h]
      Unfixed (not independent)
      
      [cache.h]
      could do with a forward declaration of "struct svc_rqst;"
      from sunrpc/svc.h but all users absolutely will need
      sunrpc/svc.h it is easier overall this way.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      72579ac9
  12. 02 9月, 2009 1 次提交
    • A
      nfsd41: replace page based DRC with buffer based DRC · 557ce264
      Andy Adamson 提交于
      Use NFSD_SLOT_CACHE_SIZE size buffers for sessions DRC instead of holding nfsd
      pages in cache.
      
      Connectathon testing has shown that 1024 bytes for encoded compound operation
      responses past the sequence operation is sufficient, 512 bytes is a little too
      small. Set NFSD_SLOT_CACHE_SIZE to 1024.
      
      Allocate memory for the session DRC in the CREATE_SESSION operation
      to guarantee that the memory resource is available for caching responses.
      Allocate each slot individually in preparation for slot table size negotiation.
      
      Remove struct nfsd4_cache_entry and helper functions for the old page-based
      DRC.
      
      The iov_len calculation in nfs4svc_encode_compoundres is now always
      correct.  Replay is now done in nfsd4_sequence under the state lock, so
      the session ref count is only bumped on non-replay. Clean up the
      nfs4svc_encode_compoundres session logic.
      
      The nfsd4_compound_state statp pointer is also not used.
      Remove nfsd4_set_statp().
      
      Move useful nfsd4_cache_entry fields into nfsd4_slot.
      
      Signed-off-by: Andy Adamson <andros@netapp.com
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      557ce264
  13. 29 8月, 2009 1 次提交
    • A
      nfsd41: expand solo sequence check · 468de9e5
      Andy Adamson 提交于
      Compounds consisting of only a sequence operation don't need any
      additional caching beyond the sequence information we store in the slot
      entry.  Fix nfsd4_is_solo_sequence to identify this case correctly.
      
      The additional check for a failed sequence in nfsd4_store_cache_entry()
      is redundant, since the nfsd4_is_solo_sequence call lower down catches
      this case.
      
      The final ce_cachethis set in nfsd4_sequence is also redundant.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      468de9e5
  14. 29 7月, 2009 1 次提交
    • A
      nfsd41: Use separate DRC for setclientid · 49557cc7
      Andy Adamson 提交于
      Instead of trying to share the generic 4.1 reply cache code for the
      CREATE_SESSION reply cache, it's simpler to handle CREATE_SESSION
      separately.
      
      The nfs41 single slot clientid DRC holds the results of create session
      processing.  CREATE_SESSION can be preceeded by a SEQUENCE operation
      (an embedded CREATE_SESSION) and the create session single slot cache must be
      maintained.  nfsd4_replay_cache_entry() and nfsd4_store_cache_entry() do not
      implement the replay of an embedded CREATE_SESSION.
      
      The clientid DRC slot does not need the inuse, cachethis or other fields that
      the multiple slot session cache uses.  Replace the clientid DRC cache struct
      nfs4_slot cache with a new nfsd4_clid_slot cache.  Save the xdr struct
      nfsd4_create_session into the cache at the end of processing, and on a replay,
      replace the struct for the replay request with the cached version all while
      under the state lock.
      
      nfsd4_proc_compound will handle both the solo and embedded CREATE_SESSION case
      via the normal use of encode_operation.
      
      Errors that do not change the create session cache:
      A create session NFS4ERR_STALE_CLIENTID error means that a client record
      (and associated create session slot) could not be found and therefore can't
      be changed.  NFSERR_SEQ_MISORDERED errors do not change the slot cache.
      
      All other errors get cached.
      
      Remove the clientid DRC specific check in nfs4svc_encode_compoundres to
      put the session only if cstate.session is set which will now always be true.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      49557cc7
  15. 17 6月, 2009 1 次提交
  16. 29 4月, 2009 1 次提交
    • J
      nfsd: support ext4 i_version · c654b8a9
      J. Bruce Fields 提交于
      ext4 supports a real NFSv4 change attribute, which is bumped whenever
      the ctime would be updated, including times when two updates arrive
      within a jiffy of each other.  (Note that although ext4 has space for
      nanosecond-precision ctime, the real resolution is lower: it actually
      uses jiffies as the time-source.)  This ensures clients will invalidate
      their caches when they need to.
      
      There is some fear that keeping the i_version up-to-date could have
      performance drawbacks, so for now it's turned on only by a mount option.
      We hope to do something better eventually.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Theodore Tso <tytso@mit.edu>
      c654b8a9
  17. 04 4月, 2009 13 次提交
  18. 30 3月, 2009 1 次提交
  19. 02 2月, 2008 1 次提交
    • F
      nfsd: Allow AIX client to read dir containing mountpoints · 406a7ea9
      Frank Filz 提交于
      This patch addresses a compatibility issue with a Linux NFS server and
      AIX NFS client.
      
      I have exported /export as fsid=0 with sec=krb5:krb5i
      I have mount --bind /home onto /export/home
      I have exported /export/home with sec=krb5i
      
      The AIX client mounts / -o sec=krb5:krb5i onto /mnt
      
      If I do an ls /mnt, the AIX client gets a permission error. Looking at
      the network traceIwe see a READDIR looking for attributes
      FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID. The response gives a
      NFS4ERR_WRONGSEC which the AIX client is not expecting.
      
      Since the AIX client is only asking for an attribute that is an
      attribute of the parent file system (pseudo root in my example), it
      seems reasonable that there should not be an error.
      
      In discussing this issue with Bruce Fields, I initially proposed
      ignoring the error in nfsd4_encode_dirent_fattr() if all that was being
      asked for was FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID, however,
      Bruce suggested that we avoid calling cross_mnt() if only these
      attributes are requested.
      
      The following patch implements bypassing cross_mnt() if only
      FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID are called. Since there
      is some complexity in the code in nfsd4_encode_fattr(), I didn't want to
      duplicate code (and introduce a maintenance nightmare), so I added a
      parameter to nfsd4_encode_fattr() that indicates whether it should
      ignore cross mounts and simply fill in the attribute using the passed in
      dentry as opposed to it's parent.
      Signed-off-by: NFrank Filz <ffilzlnx@us.ibm.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      406a7ea9
  20. 10 10月, 2007 1 次提交
    • P
      knfsd: 64 bit ino support for NFS server · 40ee5dc6
      Peter Staubach 提交于
      Modify the NFS server code to support 64 bit ino's, as
      appropriate for the system and the NFS protocol version.
      
      The gist of the changes is to query the underlying file system
      for attributes and not just to use the cached attributes in the
      inode.  For this specific purpose, the inode only contains an
      ino field which unsigned long, which is large enough on 64 bit
      platforms, but is not large enough on 32 bit platforms.
      
      I haven't been able to find any reason why ->getattr can't be called
      while i_mutex.  The specification indicates that i_mutex is not
      required to be held in order to invoke ->getattr, but it doesn't say
      that i_mutex can't be held while invoking ->getattr.
      
      I also haven't come to any conclusions regarding the value of
      lease_get_mtime() and whether it should or should not be invoked
      by fill_post_wcc() too.  I chose not to change this because I
      thought that it was safer to leave well enough alone.  If we
      decide to make a change, it can be done separately.
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Acked-by: NNeil Brown <neilb@suse.de>
      40ee5dc6
  21. 18 7月, 2007 1 次提交
  22. 14 12月, 2006 1 次提交