1. 14 7月, 2017 4 次提交
  2. 08 10月, 2016 1 次提交
  3. 14 7月, 2016 2 次提交
  4. 08 12月, 2015 1 次提交
  5. 13 10月, 2015 1 次提交
  6. 23 6月, 2015 1 次提交
    • C
      nfsd: take struct file setup fully into nfs4_preprocess_stateid_op · af90f707
      Christoph Hellwig 提交于
      This patch changes nfs4_preprocess_stateid_op so it always returns
      a valid struct file if it has been asked for that.  For that we
      now allocate a temporary struct file for special stateids, and check
      permissions if we got the file structure from the stateid.  This
      ensures that all callers will get their handling of special stateids
      right, and avoids code duplication.
      
      There is a little wart in here because the read code needs to know
      if we allocated a file structure so that it can copy around the
      read-ahead parameters.  In the long run we should probably aim to
      cache full file structures used with special stateids instead.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      af90f707
  7. 05 5月, 2015 1 次提交
    • S
      nfsd: fix pNFS return on close semantics · 8287f009
      Sachin Bhamare 提交于
      For the sake of forgetful clients, the server should return the layouts
      to the file system on 'last close' of a file (assuming that there are no
      delegations outstanding to that particular client) or on delegreturn
      (assuming that there are no opens on a file from that particular
      client).
      
      In theory the information is all there in current data structures, but
      it's not efficiently available; nfs4_file->fi_ref includes references on
      the file across all clients, but we need a per-(client, file) count.
      Walking through lots of stateid's to calculate this on each close or
      delegreturn would be painful.
      
      This patch introduces infrastructure to maintain per-client opens and
      delegation counters on a per-file basis.
      
      [hch: ported to the mainline pNFS support, merged various fixes from Jeff]
      Signed-off-by: NSachin Bhamare <sachin.bhamare@primarydata.com>
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      8287f009
  8. 16 4月, 2015 1 次提交
  9. 01 4月, 2015 2 次提交
  10. 03 2月, 2015 1 次提交
    • C
      nfsd: implement pNFS operations · 9cf514cc
      Christoph Hellwig 提交于
      Add support for the GETDEVICEINFO, LAYOUTGET, LAYOUTCOMMIT and
      LAYOUTRETURN NFSv4.1 operations, as well as backing code to manage
      outstanding layouts and devices.
      
      Layout management is very straight forward, with a nfs4_layout_stateid
      structure that extends nfs4_stid to manage layout stateids as the
      top-level structure.  It is linked into the nfs4_file and nfs4_client
      structures like the other stateids, and contains a linked list of
      layouts that hang of the stateid.  The actual layout operations are
      implemented in layout drivers that are not part of this commit, but
      will be added later.
      
      The worst part of this commit is the management of the pNFS device IDs,
      which suffers from a specification that is not sanely implementable due
      to the fact that the device-IDs are global and not bound to an export,
      and have a small enough size so that we can't store the fsid portion of
      a file handle, and must never be reused.  As we still do need perform all
      export authentication and validation checks on a device ID passed to
      GETDEVICEINFO we are caught between a rock and a hard place.  To work
      around this issue we add a new hash that maps from a 64-bit integer to a
      fsid so that we can look up the export to authenticate against it,
      a 32-bit integer as a generation that we can bump when changing the device,
      and a currently unused 32-bit integer that could be used in the future
      to handle more than a single device per export.  Entries in this hash
      table are never deleted as we can't reuse the ids anyway, and would have
      a severe lifetime problem anyway as Linux export structures are temporary
      structures that can go away under load.
      
      Parts of the XDR data, structures and marshaling/unmarshaling code, as
      well as many concepts are derived from the old pNFS server implementation
      from Andy Adamson, Benny Halevy, Dean Hildebrand, Marc Eshel, Fred Isaman,
      Mike Sager, Ricardo Labiaga and many others.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      9cf514cc
  11. 08 11月, 2014 2 次提交
  12. 30 9月, 2014 1 次提交
  13. 01 8月, 2014 1 次提交
  14. 10 7月, 2014 1 次提交
  15. 09 7月, 2014 4 次提交
  16. 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
  17. 27 5月, 2014 1 次提交
  18. 23 5月, 2014 2 次提交
  19. 29 3月, 2014 1 次提交
  20. 07 1月, 2014 1 次提交
  21. 04 1月, 2014 1 次提交
  22. 15 5月, 2013 1 次提交
  23. 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
  24. 03 4月, 2013 2 次提交
  25. 24 1月, 2013 1 次提交
  26. 18 12月, 2012 1 次提交