1. 05 8月, 2016 2 次提交
  2. 16 7月, 2016 1 次提交
  3. 14 7月, 2016 2 次提交
  4. 18 3月, 2016 1 次提交
    • C
      nfsd: add SCSI layout support · f99d4fbd
      Christoph Hellwig 提交于
      This is a simple extension to the block layout driver to use SCSI
      persistent reservations for access control and fencing, as well as
      SCSI VPD pages for device identification.
      
      For this we need to pass the nfs4_client to the proc_getdeviceinfo method
      to generate the reservation key, and add a new fence_client method
      to allow for fence actions in the layout driver.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      f99d4fbd
  5. 16 3月, 2016 1 次提交
    • J
      nfsd: fix deadlock secinfo+readdir compound · 2f6fc056
      J. Bruce Fields 提交于
      nfsd_lookup_dentry exits with the parent filehandle locked.  fh_put also
      unlocks if necessary (nfsd filehandle locking is probably too lenient),
      so it gets unlocked eventually, but if the following op in the compound
      needs to lock it again, we can deadlock.
      
      A fuzzer ran into this; normal clients don't send a secinfo followed by
      a readdir in the same compound.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      2f6fc056
  6. 03 3月, 2016 1 次提交
  7. 23 1月, 2016 1 次提交
    • A
      wrappers for ->i_mutex access · 5955102c
      Al Viro 提交于
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  8. 08 12月, 2015 2 次提交
  9. 24 10月, 2015 1 次提交
    • J
      nfsd: serialize layout stateid morphing operations · cc8a5532
      Jeff Layton 提交于
      In order to allow the client to make a sane determination of what
      happened with racing LAYOUTGET/LAYOUTRETURN/CB_LAYOUTRECALL calls, we
      must ensure that the seqids return accurately represent the order of
      operations. The simplest way to do that is to ensure that operations on
      a single stateid are serialized.
      
      This patch adds a mutex to the layout stateid, and locks it when
      checking the layout stateid's seqid. The mutex is held over the entire
      operation and released after the seqid is bumped.
      
      Note that in the case of CB_LAYOUTRECALL we must move the increment of
      the seqid and setting into a new cb "prepare" operation. The lease
      infrastructure will call the lm_break callback with a spinlock held, so
      and we can't take the mutex in that codepath.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      cc8a5532
  10. 01 9月, 2015 1 次提交
  11. 13 8月, 2015 1 次提交
  12. 11 8月, 2015 1 次提交
  13. 21 7月, 2015 1 次提交
  14. 23 6月, 2015 2 次提交
  15. 22 4月, 2015 2 次提交
  16. 16 4月, 2015 1 次提交
  17. 01 4月, 2015 3 次提交
  18. 21 3月, 2015 1 次提交
  19. 03 2月, 2015 3 次提交
    • C
      nfsd: add trace events · 31ef83dc
      Christoph Hellwig 提交于
      For now just a few simple events to trace the layout stateid lifetime, but
      these already were enough to find several bugs in the Linux client layout
      stateid handling.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      31ef83dc
    • C
      nfsd: implement pNFS layout recalls · c5c707f9
      Christoph Hellwig 提交于
      Add support to issue layout recalls to clients.  For now we only support
      full-file recalls to get a simple and stable implementation.  This allows
      to embedd a nfsd4_callback structure in the layout_state and thus avoid
      any memory allocations under spinlocks during a recall.  For normal
      use cases that do not intent to share a single file between multiple
      clients this implementation is fully sufficient.
      
      To ensure layouts are recalled on local filesystem access each layout
      state registers a new FL_LAYOUT lease with the kernel file locking code,
      which filesystems that support pNFS exports that require recalls need
      to break on conflicting access patterns.
      
      The XDR code is based on the old pNFS server implementation by
      Andy Adamson, Benny Halevy, Boaz Harrosh, Dean Hildebrand, Fred Isaman,
      Marc Eshel, Mike Sager and Ricardo Labiaga.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      c5c707f9
    • 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
  20. 10 12月, 2014 2 次提交
  21. 08 11月, 2014 2 次提交
  22. 24 10月, 2014 1 次提交
    • J
      nfsd4: fix crash on unknown operation number · 51904b08
      J. Bruce Fields 提交于
      Unknown operation numbers are caught in nfsd4_decode_compound() which
      sets op->opnum to OP_ILLEGAL and op->status to nfserr_op_illegal.  The
      error causes the main loop in nfsd4_proc_compound() to skip most
      processing.  But nfsd4_proc_compound also peeks ahead at the next
      operation in one case and doesn't take similar precautions there.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      51904b08
  23. 21 10月, 2014 1 次提交
  24. 30 9月, 2014 1 次提交
  25. 05 8月, 2014 1 次提交
  26. 01 8月, 2014 1 次提交
  27. 30 7月, 2014 1 次提交
  28. 10 7月, 2014 1 次提交
  29. 09 7月, 2014 1 次提交