1. 18 12月, 2012 2 次提交
  2. 03 12月, 2012 1 次提交
  3. 28 11月, 2012 2 次提交
  4. 26 11月, 2012 5 次提交
    • 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
    • J
      nfsd4: reorganize write decoding · 5a80a54d
      J. Bruce Fields 提交于
      In preparation for moving some of it elsewhere.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      5a80a54d
    • J
      nfsd4: simplify reading of opnum · 8a61b18c
      J. Bruce Fields 提交于
      The comment here is totally bogus:
      	- OP_WRITE + 1 is RELEASE_LOCKOWNER.  Maybe there was some older
      	  version of the spec in which that served as a sort of
      	  OP_ILLEGAL?  No idea, but it's clearly wrong now.
      	- In any case, I can't see that the spec says anything about
      	  what to do if the client sends us less ops than promised.
      	  It's clearly nutty client behavior, and we should do
      	  whatever's easiest: returning an xdr error (even though it
      	  won't be consistent with the error on the last op returned)
      	  seems fine to me.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      8a61b18c
    • J
      447bfcc9
  5. 08 11月, 2012 4 次提交
  6. 26 9月, 2012 1 次提交
  7. 11 7月, 2012 1 次提交
  8. 01 6月, 2012 5 次提交
  9. 13 4月, 2012 2 次提交
  10. 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
  11. 18 2月, 2012 3 次提交
  12. 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
  13. 26 11月, 2011 1 次提交
  14. 02 11月, 2011 1 次提交
  15. 24 10月, 2011 3 次提交
  16. 19 10月, 2011 1 次提交
  17. 17 10月, 2011 1 次提交
  18. 12 10月, 2011 1 次提交
  19. 11 10月, 2011 1 次提交
  20. 27 9月, 2011 2 次提交
    • J
      nfsd4: look up stateid's per clientid · 38c2f4b1
      J. Bruce Fields 提交于
      Use a separate stateid idr per client, and lookup a stateid by first
      finding the client, then looking up the stateid relative to that client.
      
      Also some minor refactoring.
      
      This allows us to improve error returns: we can return expired when the
      clientid is not found and bad_stateid when the clientid is found but not
      the stateid, as opposed to returning expired for both cases.
      
      I hope this will also help to replace the state lock mostly by a
      per-client lock, but that hasn't been done yet.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      38c2f4b1
    • J
      nfsd4: assume test_stateid always has session · 36279ac1
      J. Bruce Fields 提交于
      Test_stateid is 4.1-only and only allowed after a sequence operation, so
      this check is unnecessary.
      
      Cc: Bryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      36279ac1
  21. 17 9月, 2011 1 次提交