1. 31 10月, 2011 1 次提交
  2. 01 8月, 2011 4 次提交
  3. 13 7月, 2011 4 次提交
  4. 12 7月, 2011 1 次提交
  5. 21 6月, 2011 1 次提交
  6. 17 6月, 2011 1 次提交
  7. 15 6月, 2011 1 次提交
  8. 30 5月, 2011 3 次提交
  9. 28 4月, 2011 2 次提交
    • B
      NFS: Return meaningful status from decode_secinfo() · 613e901e
      Bryan Schumaker 提交于
      When compiling, I was getting this warning:
      fs/nfs/nfs4xdr.c: In function ‘decode_secinfo’:
      fs/nfs/nfs4xdr.c:4839:6: warning: variable ‘status’ set but not used
      [-Wunused-but-set-variable]
      
      We were unconditionally returning 0 as long as there wasn't an error
      coming out of xdr_inline_decode().  We probably want to check the error
      status coming out of decode_op_hdr() and decode_secinfo_gss(), rather
      than assuming that everything is OK all the time.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      613e901e
    • T
      NFSv4: Ensure we request the ordinary fileid when doing readdirplus · 28331a46
      Trond Myklebust 提交于
      When readdir() returns a directory entry for the root of a mounted
      filesystem, Linux follows the old convention of returning the inode
      number of the covered directory (despite newer versions of POSIX declaring
      that this is a bug).
      To ensure this continues to work, the NFSv4 readdir implementation requests
      the 'mounted-on-fileid' from the server.
      
      However, readdirplus also needs to instantiate an inode for this entry, and
      for that, we also need to request the real fileid as per this patch.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      28331a46
  10. 14 4月, 2011 1 次提交
    • B
      NFS: Use correct variable for page bounds checking · c3dfc280
      Bryan Schumaker 提交于
      While decoding a secinfo reply, I store the list of supported sec
      flavors on a page accessible through res->flavors.  Before reading
      each new flavor, I do some math to determine if there is enough
      space left on this page, and I break out of my read look if there
      isn't.  In order to perform this check correctly, I need to use the
      address of res->flavors, rather than the address of res.
      
      When this loop was broken early I lied to the caller and told them
      that the entire list had been decoded.  This could lead to problems
      if the caller tries to use any the garbage data claiming to be a
      valid sec flavor.  I fixed this by using res->flavors->num_flavors
      as a counter, incrementing it every time a sec flavor is
      successfully decoded.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c3dfc280
  11. 25 3月, 2011 3 次提交
  12. 24 3月, 2011 2 次提交
  13. 12 3月, 2011 4 次提交
  14. 11 3月, 2011 1 次提交
  15. 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
  16. 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
  17. 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
  18. 17 12月, 2010 5 次提交