18 Feb, 2016
1 commit
-
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server. But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol. Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.Signed-off-by: Christoph Hellwig
Signed-off-by: Trond Myklebust
23 Jan, 2016
1 commit
-
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: Al Viro
28 Dec, 2015
1 commit
-
When server returns layoutstats stateid error, we should
invalidate client's layout so that next IO can trigger new
layoutget.Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust
24 Nov, 2015
2 commits
-
NFS v4.2 operations can work outside of pNFS, so dprintk() output
shouldn't be placed under NFSDBG_PNFS.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust -
Currently we pass uninitialized stack garbage in the count parameter.
The value is usually large enought to clone whole files and thus let
simple tests pass, but it makes the tests for range clones very unhappy.Signed-off-by: Christoph Hellwig
Signed-off-by: Trond Myklebust
16 Oct, 2015
1 commit
-
Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust
18 Sep, 2015
1 commit
-
We're incorrectly assigning a loff_t return to an int. If SEEK_HOLE or
SEEK_DATA returns an offset over 2^31 then the application will see a
weird lseek() result (usually -EIO).Cc: stable@vger.kernel.org
Fixes: bdcc2cd14e4e "NFSv4.2: handle NFS-specific llseek errors"
Signed-off-by: J. Bruce Fields
Reviewed-by: Anna Schumaker
Signed-off-by: Trond Myklebust
27 Jul, 2015
1 commit
-
Handle NFS-specific llseek errors instead of letting them leak out to
userspace.Reported-by: Benjamin Coddington
Signed-off-by: J. Bruce Fields
Signed-off-by: Trond Myklebust
27 Jun, 2015
1 commit
-
Make it so, by checking the return value for NFS4ERR_MOTSUPP and
caching the information as a server capability.Signed-off-by: Trond Myklebust
24 Jun, 2015
4 commits
-
There is no need to report concurrently.
Reviewed-by: Jeff Layton
Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust -
Reviewed-by: Jeff Layton
Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust -
Reviewed-by: Jeff Layton
Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust -
Reviewed-by: Jeff Layton
Signed-off-by: Trond Myklebust
Signed-off-by: Peng Tao
Signed-off-by: Trond Myklebust
24 Apr, 2015
2 commits
-
At the very least, we should not be taking the i_mutex until after
checking if the server even supports ALLOCATE or DEALLOCATE, allowing
v4.0 or v4.1 to exit without potentially waiting on a lock.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust -
This patch adds a GETATTR to the end of ALLOCATE and DEALLOCATE
operations so we can set the updated inode size and change attribute
directly. DEALLOCATE will still need to release pagecache pages, so
nfs42_proc_deallocate() now calls truncate_pagecache_range() before
contacting the server.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust
26 Nov, 2014
2 commits
-
This patch adds support for using the NFS v4.2 operation DEALLOCATE to
punch holes in a file.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust -
This patch adds support for using the NFS v4.2 operation ALLOCATE to
preallocate data in a file.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust
25 Nov, 2014
1 commit
-
This should make the code easier to maintain in the future.
Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust
01 Oct, 2014
1 commit
-
The SEEK operation is used when an application makes an lseek call with
either the SEEK_HOLE or SEEK_DATA flags set. I fall back on
nfs_file_llseek() if the server does not have SEEK support.Signed-off-by: Anna Schumaker
Signed-off-by: Trond Myklebust