1. 29 1月, 2011 2 次提交
    • C
      NFS: NFSv4 readdir loses entries · d1205f87
      Chuck Lever 提交于
      On recent 2.6.38-rc kernels, connectathon basic test 6 fails on
      NFSv4 mounts of OpenSolaris with something like:
      
      > ./test6: readdir
      > 	./test6: (/mnt/klimt/matisse.test) didn't read expected 'file.12' dir entry, pass 0
      > 	./test6: (/mnt/klimt/matisse.test) didn't read expected 'file.82' dir entry, pass 0
      > 	./test6: (/mnt/klimt/matisse.test) didn't read expected 'file.164' dir entry, pass 0
      > 	./test6: (/mnt/klimt/matisse.test) Test failed with 3 errors
      > basic tests failed
      > Tests failed, leaving /mnt/klimt mounted
      > [cel@matisse cthon04]$
      
      I narrowed the problem down to nfs4_decode_dirent() reporting that the
      decode buffer had overflowed while decoding the entries for those
      missing files.
      
      verify_attr_len() assumes both it's pointer arguments reside on the
      same page.  When these arguments point to locations on two different
      pages, verify_attr_len() can report false errors.  This can happen now
      that a large NFSv4 readdir result can span pages.
      
      We have reasonably good checking in nfs4_decode_dirent() anyway, so
      it should be safe to simply remove the extra checking.
      
      At a guess, this was introduced by commit 6650239a, "NFS: Don't use
      vm_map_ram() in readdir".
      
      Cc: stable@kernel.org [2.6.37]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d1205f87
    • C
      NFS: Micro-optimize nfs4_decode_dirent() · c08e76d0
      Chuck Lever 提交于
      Make the decoding of NFSv4 directory entries slightly more efficient
      by:
      
        1.  Avoiding unnecessary byte swapping when checking XDR booleans,
            and
      
        2.  Not bumping "p" when its value will be immediately replaced by
            xdr_inline_decode()
      
      This commit makes nfs4_decode_dirent() consistent with similar logic
      in the other two decode_dirent() functions.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c08e76d0
  2. 11 1月, 2011 1 次提交
    • T
      NFS: Don't use vm_map_ram() in readdir · 6650239a
      Trond Myklebust 提交于
      vm_map_ram() is not available on NOMMU platforms, and causes trouble
      on incoherrent architectures such as ARM when we access the page data
      through both the direct and the virtual mapping.
      
      The alternative is to use the direct mapping to access page data
      for the case when we are not crossing a page boundary, but to copy
      the data into a linear scratch buffer when we are accessing data
      that spans page boundaries.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Tested-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Cc: stable@kernel.org  [2.6.37]
      6650239a
  3. 07 1月, 2011 3 次提交
    • T
      NFSv4: Ensure continued open and lockowner name uniqueness · d035c36c
      Trond Myklebust 提交于
      In order to enable migration support, we will want to move some of the
      structures that are subject to migration into the struct nfs_server.
      In particular, if we are to move the state_owner and state_owner_id to
      being a per-filesystem structure, then we should label the resulting
      open/lock owners with a per-filesytem label to ensure global uniqueness.
      
      This patch does so by adding the super block s_dev to the open/lock owner
      name.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d035c36c
    • F
      pnfs: serialize LAYOUTGET(openstateid) · cf7d63f1
      Fred Isaman 提交于
      We shouldn't send a LAYOUTGET(openstateid) unless all outstanding RPCs
      using the previous stateid are completed.  This requires choosing the
      stateid to encode earlier, so we can abort if one is not available (we
      want to use the open stateid, but a LAYOUTGET is already out using
      it), and adding a count of the number of outstanding rpc calls using
      layout state (which for now consist solely of LAYOUTGETs).
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cf7d63f1
    • F
      pnfs: change layout state seqlock to a spinlock · fd6002e9
      Fred Isaman 提交于
      This prepares for future changes, where the layout state needs
      to change atomically with several other variables.  In particular,
      it will need to know if lo->segs is empty, as we test that instead
      of manipulating the NFS_LAYOUT_STATEID_SET bit.  Moreover, the
      layoutstateid is not really a read-mostly structure, as it is
      written almost as often as it is read.
      
      The behavior of pnfs_get_layout_stateid is also slightly changed, so that
      it no longer changes the stateid.  Its name is changed to +pnfs_choose_layoutget_stateid.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fd6002e9
  4. 17 12月, 2010 6 次提交
  5. 23 11月, 2010 2 次提交
  6. 16 11月, 2010 1 次提交
  7. 25 10月, 2010 7 次提交
  8. 24 10月, 2010 6 次提交
  9. 08 10月, 2010 1 次提交
    • B
      NFS: new idmapper · 955a857e
      Bryan Schumaker 提交于
      This patch creates a new idmapper system that uses the request-key function to
      place a call into userspace to map user and group ids to names.  The old
      idmapper was single threaded, which prevented more than one request from running
      at a single time.  This means that a user would have to wait for an upcall to
      finish before accessing a cached result.
      
      The upcall result is stored on a keyring of type id_resolver.  See the file
      Documentation/filesystems/nfs/idmapper.txt for instructions.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      [Trond: fix up the return value of nfs_idmap_lookup_name and clean up code]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      955a857e
  10. 24 9月, 2010 1 次提交
  11. 22 9月, 2010 1 次提交
  12. 18 9月, 2010 2 次提交
  13. 04 8月, 2010 1 次提交
  14. 31 7月, 2010 4 次提交
  15. 23 6月, 2010 2 次提交