1. 08 11月, 2014 1 次提交
  2. 30 9月, 2014 1 次提交
  3. 01 8月, 2014 1 次提交
  4. 10 7月, 2014 1 次提交
  5. 09 7月, 2014 4 次提交
  6. 31 5月, 2014 4 次提交
    • J
      nfsd4: allow large readdirs · 561f0ed4
      J. Bruce Fields 提交于
      Currently we limit readdir results to a single page.  This can result in
      a performance regression compared to NFSv3 when reading large
      directories.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      561f0ed4
    • J
      nfsd4: more precise nfsd4_max_reply · 4f0cefbf
      J. Bruce Fields 提交于
      It will turn out to be useful to have a more accurate estimate of reply
      size; so, piggyback on the existing op reply-size estimators.
      
      Also move nfsd4_max_reply to nfs4proc.c to get easier access to struct
      nfsd4_operation and friends.  (Thanks to Christoph Hellwig for pointing
      out that simplification.)
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      4f0cefbf
    • J
      nfsd4: convert 4.1 replay encoding · f5236013
      J. Bruce Fields 提交于
      Limits on maxresp_sz mean that we only ever need to replay rpc's that
      are contained entirely in the head.
      
      The one exception is very small zero-copy reads.  That's an odd corner
      case as clients wouldn't normally ask those to be cached.
      
      in any case, this seems a little more robust.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      f5236013
    • J
      nfsd4: teach encoders to handle reserve_space failures · d0a381dd
      J. Bruce Fields 提交于
      We've tried to prevent running out of space with COMPOUND_SLACK_SPACE
      and special checking in those operations (getattr) whose result can vary
      enormously.
      
      However:
      	- COMPOUND_SLACK_SPACE may be difficult to maintain as we add
      	  more protocol.
      	- BUG_ON or page faulting on failure seems overly fragile.
      	- Especially in the 4.1 case, we prefer not to fail compounds
      	  just because the returned result came *close* to session
      	  limits.  (Though perfect enforcement here may be difficult.)
      	- I'd prefer encoding to be uniform for all encoders instead of
      	  having special exceptions for encoders containing, for
      	  example, attributes.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      d0a381dd
  7. 27 5月, 2014 1 次提交
  8. 23 5月, 2014 2 次提交
  9. 29 3月, 2014 1 次提交
  10. 07 1月, 2014 1 次提交
  11. 04 1月, 2014 1 次提交
  12. 15 5月, 2013 1 次提交
  13. 08 4月, 2013 1 次提交
    • J
      nfsd4: cleanup handling of nfsv4.0 closed stateid's · 9411b1d4
      J. Bruce Fields 提交于
      Closed stateid's are kept around a little while to handle close replays
      in the 4.0 case.  So we stash them in the last-used stateid in the
      oo_last_closed_stateid field of the open owner.  We can free that in
      encode_seqid_op_tail once the seqid on the open owner is next
      incremented.  But we don't want to do that on the close itself; so we
      set NFS4_OO_PURGE_CLOSE flag set on the open owner, skip freeing it the
      first time through encode_seqid_op_tail, then when we see that flag set
      next time we free it.
      
      This is unnecessarily baroque.
      
      Instead, just move the logic that increments the seqid out of the xdr
      code and into the operation code itself.
      
      The justification given for the current placement is that we need to
      wait till the last minute to be sure we know whether the status is a
      sequence-id-mutating error or not, but examination of the code shows
      that can't actually happen.
      Reported-by: NYanchuan Nian <ycnian@gmail.com>
      Tested-by: NYanchuan Nian <ycnian@gmail.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      9411b1d4
  14. 03 4月, 2013 2 次提交
  15. 24 1月, 2013 1 次提交
  16. 18 12月, 2012 1 次提交
  17. 26 11月, 2012 2 次提交
    • J
      nfsd4: delay filling in write iovec array till after xdr decoding · ffe1137b
      J. Bruce Fields 提交于
      Our server rejects compounds containing more than one write operation.
      It's unclear whether this is really permitted by the spec; with 4.0,
      it's possibly OK, with 4.1 (which has clearer limits on compound
      parameters), it's probably not OK.  No client that we're aware of has
      ever done this, but in theory it could be useful.
      
      The source of the limitation: we need an array of iovecs to pass to the
      write operation.  In the worst case that array of iovecs could have
      hundreds of elements (the maximum rwsize divided by the page size), so
      it's too big to put on the stack, or in each compound op.  So we instead
      keep a single such array in the compound argument.
      
      We fill in that array at the time we decode the xdr operation.
      
      But we decode every op in the compound before executing any of them.  So
      once we've used that array we can't decode another write.
      
      If we instead delay filling in that array till the time we actually
      perform the write, we can reuse it.
      
      Another option might be to switch to decoding compound ops one at a
      time.  I considered doing that, but it has a number of other side
      effects, and I'd rather fix just this one problem for now.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ffe1137b
    • J
      nfsd4: move more write parameters into xdr argument · 70cc7f75
      J. Bruce Fields 提交于
      In preparation for moving some of this elsewhere.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      70cc7f75
  18. 15 11月, 2012 1 次提交
  19. 08 11月, 2012 1 次提交
  20. 01 6月, 2012 1 次提交
  21. 21 3月, 2012 1 次提交
    • C
      NFSD: Fix nfs4_verifier memory alignment · ab4684d1
      Chuck Lever 提交于
      Clean up due to code review.
      
      The nfs4_verifier's data field is not guaranteed to be u32-aligned.
      Casting an array of chars to a u32 * is considered generally
      hazardous.
      
      We can fix most of this by using a __be32 array to generate the
      verifier's contents and then byte-copying it into the verifier field.
      
      However, there is one spot where there is a backwards compatibility
      constraint: the do_nfsd_create() call expects a verifier which is
      32-bit aligned.  Fix this spot by forcing the alignment of the create
      verifier in the nfsd4_open args structure.
      
      Also, sizeof(nfs4_verifer) is the size of the in-core verifier data
      structure, but NFS4_VERIFIER_SIZE is the number of octets in an XDR'd
      verifier.  The two are not interchangeable, even if they happen to
      have the same value.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ab4684d1
  22. 18 2月, 2012 3 次提交
  23. 16 2月, 2012 3 次提交
  24. 15 2月, 2012 1 次提交
    • J
      nfsd4: rearrange struct nfsd4_slot · 73e79482
      J. Bruce Fields 提交于
      Combine two booleans into a single flag field, move the smaller fields
      to the end.
      
      (In practice this doesn't make the struct any smaller.  But we'll be
      adding another flag here soon.)
      
      Remove some debugging code that doesn't look useful, while we're in the
      neighborhood.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      73e79482
  25. 24 10月, 2011 1 次提交
  26. 18 10月, 2011 2 次提交