Skip to content
  1. Feb 05, 2015
    • Christoph Hellwig's avatar
      nfsd: pNFS block layout driver · 8650b8a0
      Christoph Hellwig authored
      
      
      Add a small shim between core nfsd and filesystems to translate the
      somewhat cumbersome pNFS data structures and semantics to something
      more palatable for Linux filesystems.
      
      Thanks to Rick McNeal for the old prototype pNFS blocklayout server
      code, which gave a lot of inspiration to this version even if no
      code is left from it.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      8650b8a0
  2. Feb 02, 2015
    • Christoph Hellwig's avatar
      nfsd: add trace events · 31ef83dc
      Christoph Hellwig authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      31ef83dc
    • Christoph Hellwig's avatar
      nfsd: implement pNFS layout recalls · c5c707f9
      Christoph Hellwig authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      c5c707f9
    • Christoph Hellwig's avatar
      nfsd: implement pNFS operations · 9cf514cc
      Christoph Hellwig authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      9cf514cc
    • Christoph Hellwig's avatar
    • Christoph Hellwig's avatar
    • Christoph Hellwig's avatar
    • Christoph Hellwig's avatar
      nfsd: add fh_fsid_match helper · 9558f250
      Christoph Hellwig authored
      
      
      Add a helper to check that the fsid parts of two file handles match.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      9558f250
    • Christoph Hellwig's avatar
      nfsd: move nfsd_fh_match to nfsfh.h · 4d94c2ef
      Christoph Hellwig authored
      
      
      The pnfs code will need it too.  Also remove the nfsd_ prefix to match the
      other filehandle helpers in that file.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      4d94c2ef
    • Christoph Hellwig's avatar
      fs: track fl_owner for leases · 2ab99ee1
      Christoph Hellwig authored
      
      
      Just like for other lock types we should allow different owners to have
      a read lease on a file.  Currently this can't happen, but with the addition
      of pNFS layout leases we'll need this feature.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      2ab99ee1
  3. Jan 23, 2015
  4. Jan 16, 2015
  5. Jan 15, 2015
  6. Jan 07, 2015
  7. Dec 10, 2014
    • Daniel Borkmann's avatar
      net: replace remaining users of arch_fast_hash with jhash · 87545899
      Daniel Borkmann authored
      This patch effectively reverts commit 500f8087 ("net: ovs: use CRC32
      accelerated flow hash if available"), and other remaining arch_fast_hash()
      users such as from nfsd via commit 6282cd56 ("NFSD: Don't hand out
      delegations for 30 seconds after recalling them.") where it has been used
      as a hash function for bloom filtering.
      
      While we think that these users are actually not much of concern, it has
      been requested to remove the arch_fast_hash() library bits that arose
      from [1] entirely as per recent discussion [2]. The main argument is that
      using it as a hash may introduce bias due to its linearity (see avalanche
      criterion) and thus makes it less clear (though we tried to document that)
      when this security/performance trade-off is actually acceptable for a
      general purpose library function.
      
      Lets therefore avoid any further confusion on this matter and remove it to
      prevent any future accidental misuse of it. For the time being, this is
      going to make hashing of flow keys a bit more expensive in the ovs case,
      but future work could reevaluate a different hashing discipline.
      
        [1] https://patchwork.ozlabs.org/patch/299369/
        [2] https://patchwork.ozlabs.org/patch/418756/
      
      
      
      Cc: Neil Brown <neilb@suse.de>
      Cc: Francesco Fusco <fusco@ntop.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87545899
  8. Dec 09, 2014
  9. Dec 01, 2014
  10. Nov 19, 2014
  11. Nov 07, 2014
  12. Oct 31, 2014
  13. Oct 23, 2014
Loading