1. 27 6月, 2015 2 次提交
  2. 26 6月, 2015 3 次提交
  3. 24 6月, 2015 10 次提交
  4. 18 6月, 2015 3 次提交
  5. 16 6月, 2015 8 次提交
  6. 12 6月, 2015 4 次提交
  7. 11 6月, 2015 4 次提交
  8. 05 6月, 2015 1 次提交
  9. 03 6月, 2015 1 次提交
    • S
      vfs: read file_handle only once in handle_to_path · 161f873b
      Sasha Levin 提交于
      We used to read file_handle twice.  Once to get the amount of extra
      bytes, and once to fetch the entire structure.
      
      This may be problematic since we do size verifications only after the
      first read, so if the number of extra bytes changes in userspace between
      the first and second calls, we'll have an incoherent view of
      file_handle.
      
      Instead, read the constant size once, and copy that over to the final
      structure without having to re-read it again.
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      161f873b
  10. 02 6月, 2015 4 次提交
    • J
      NFS: drop unneeded goto · 13985b1f
      Julia Lawall 提交于
      Delete jump to a label on the next line, when that label is not
      used elsewhere.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier l;
      @@
      
      -if (...) goto l;
      -l:
      // </smpl>
      
      Also drop the unnecessary ret variable.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      13985b1f
    • C
      NFS: Fix size of NFSACL SETACL operations · d683cc49
      Chuck Lever 提交于
      When encoding the NFSACL SETACL operation, reserve just the estimated
      size of the ACL rather than a fixed maximum. This eliminates needless
      zero padding on the wire that the server ignores.
      
      Fixes: ee5dc773 ('NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"')
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      d683cc49
    • N
      NFS: report more appropriate block size for directories. · 7ef5ca4f
      NeilBrown 提交于
      In glibc 2.21 (and several previous), a call to opendir() will
      result in a 32K (BUFSIZ*4) buffer being allocated and passed to
      getdents.
      
      However a call to fdopendir() results in an 'fstat' request to
      determine block size and a matching buffer allocated for subsequent
      use with getdents.  This will typically be 1M.
      
      The first getdents call on an NFS directory will always use
      READDIR_PLUS (or NFSv4 equivalent) if available.  Subsequent getdents
      calls only use this more expensive version if some 'stat' requests are
      made between the getdents calls.
      
      For this reason it is good to keep at least that first getdents call
      relatively short.  When fdopendir() and readdir() is used on a large
      directory, it takes approximately 32 times as long to complete as
      using "opendir".  Current versions of 'find' use fdopendir() and
      demonstrate this slowness.
      
      'stat' on a directory currently returns the 'wsize'.  This number has
      no meaning on directories.
      Actual READDIR requests are limited to ->dtsize, which itself is
      capped at 4 pages, coincidently the same as BUFSIZ*4.
      So this is a meaningful number to use as the blocksize on directories,
      and has the effect of making 'find' on large directories go a lot
      faster.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      7ef5ca4f
    • T
      NFSv4: Always drain the slot table before re-establishing the lease · 5cae02f4
      Trond Myklebust 提交于
      While the NFSv4.1 code has always drained the slot tables in order to stop
      non-recovery related RPC calls when doing lease recovery, the NFSv4 code
      did not.
      The reason for the difference in behaviour is that NFSv4 does not have
      session state, and so RPC calls can in theory proceed while recovery is
      happening. In practice, however, anything I/O or state related needs to
      wait until recovery is over.
      
      This patch changes the behaviour of NFSv4 to match that of NFSv4.1 so that
      we can simplify the state recovery code by assuming that we do not have to
      deal with races between recovery and ordinary I/O.
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      5cae02f4