- 19 Apr, 2012 1 commit
-
-
Trond Myklebust authored
If the file wasn't opened for writing, then truncate and ftruncate need to report the appropriate errors. Reported-by:
Miklos Szeredi <miklos@szeredi.hu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
-
- 20 Mar, 2012 1 commit
-
-
Cong Wang authored
Signed-off-by:
Cong Wang <amwang@redhat.com>
-
- 02 Mar, 2012 1 commit
-
-
Chuck Lever authored
Eliminate a number of implicit type casts in comparisons, and these compiler warnings: fs/nfs/dir.c: In function ‘nfs_readdir_clear_array’: fs/nfs/dir.c:264:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] fs/nfs/dir.c: In function ‘nfs_readdir_search_for_cookie’: fs/nfs/dir.c:352:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] fs/nfs/dir.c: In function ‘nfs_do_filldir’: fs/nfs/dir.c:769:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] fs/nfs/dir.c:780:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by:
Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 01 Feb, 2012 1 commit
-
-
Trond Myklebust authored
Currently, we will correctly optimise away a truncate that doesn't change the file size. However, in the case of open(O_TRUNC), we also want to optimise away the time changes. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 04 Jan, 2012 4 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
vfs_create() ignores everything outside of 16bit subset of its mode argument; switching it to umode_t is obviously equivalent and it's the only caller of the method Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
vfs_mkdir() gets int, but immediately drops everything that might not fit into umode_t and that's the only caller of ->mkdir()... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
No need to duplicate them in both callers; make it return ERR_PTR(-ENOMEM) on allocation failure instead of NULL and it'll be able to report rpc_lookup_cred() failures just fine. Callers are much happier that way... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 04 Nov, 2011 1 commit
-
-
Jeff Layton authored
commit d953126a changed how nfs_atomic_lookup handles an -EISDIR return from an OPEN call. Prior to that patch, that caused the client to fall back to doing a normal lookup. When that patch went in, the code began returning that error to userspace. The d_revalidate codepath however never had the corresponding change, so it was still possible to end up with a NULL ctx->state pointer after that. That patch caused a regression. When we attempt to open a directory that does not have a cached dentry, that open now errors out with EISDIR. If you attempt the same open with a cached dentry, it will succeed. Fix this by reverting the change in nfs_atomic_lookup and allowing attempts to open directories to fall back to a normal lookup Also, add a NFSv4-specific f_ops->open routine that just returns -ENOTDIR. This should never be called if things are working properly, but if it ever is, then the dprintk may help in debugging. To facilitate this, a new file_operations field is also added to the nfs_rpc_ops struct. Cc: stable@kernel.org Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 30 Jul, 2011 2 commits
-
-
Bryan Schumaker authored
Print out the name of the file that triggers the cookie loop message to make it slightly easier to track down the cause. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
If the directory contents change, then we have to accept that the file->f_pos value may shrink if we do a 'search-by-cookie'. In that case, we should turn off the loop detection and let the NFS client try to recover. The patch also fixes a second loop detection bug by ensuring that after turning on the ctx->duped flag, we read at least one new cookie into ctx->dir_cookie before attempting to match with ctx->dup_cookie. Reported-by:
Petr Vandrovec <petr@vandrovec.name> Cc: stable@kernel.org [2.6.39+] Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 21 Jul, 2011 1 commit
-
-
Josef Bacik authored
Btrfs needs to be able to control how filemap_write_and_wait_range() is called in fsync to make it less of a painful operation, so push down taking i_mutex and the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some file systems can drop taking the i_mutex altogether it seems, like ext3 and ocfs2. For correctness sake I just pushed everything down in all cases to make sure that we keep the current behavior the same for everybody, and then each individual fs maintainer can make up their mind about what to do from there. Thanks, Acked-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Josef Bacik <josef@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 20 Jul, 2011 9 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
... it will be set in nd->flag for all cases with non-NULL nd (i.e. when called from do_last()). Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
->create() instances are much happier that way... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
a) check the right flags in ->create() (LOOKUP_OPEN, not LOOKUP_CREATE) b) default (!LOOKUP_OPEN) open_flags is O_CREAT|O_EXCL|FMODE_READ, not 0 c) lookup_instantiate_filp() should be done only with LOOKUP_OPEN; otherwise we need to issue CLOSE, lest we leak stateid on server. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
just open flags; switched to passing just those and renamed to create_nfs_open_context() Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
just dentry, please... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
not used by the instances anymore. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
redundant; all callers get it duplicated in mask & MAY_NOT_BLOCK and none of them removes that bit. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
its value depends only on inode and does not change; we might as well store it in ->i_op->check_acl and be done with that. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 29 May, 2011 1 commit
-
-
Benny Halevy authored
Initialize xdr_stream and xdr_buf using an array of page pointers and length of buffer. Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
- 26 May, 2011 3 commits
-
-
Sage Weil authored
NFS has no problems with lingering references to unlinked directory inodes. CC: Trond Myklebust <Trond.Myklebust@netapp.com> CC: linux-nfs@vger.kernel.org Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Sage Weil authored
Only a few file systems need this. Start by pushing it down into each rename method (except gfs2 and xfs) so that it can be dealt with on a per-fs basis. Acked-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Sage Weil authored
Only a few file systems need this. Start by pushing it down into each fs rmdir method (except gfs2 and xfs) so it can be dealt with on a per-fs basis. This does not change behavior for any in-tree file systems. Acked-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sage Weil <sage@newdream.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 25 May, 2011 1 commit
-
-
Ying Han authored
Change each shrinker's API by consolidating the existing parameters into shrink_control struct. This will simplify any further features added w/o touching each file of shrinker. [akpm@linux-foundation.org: fix build] [akpm@linux-foundation.org: fix warning] [kosaki.motohiro@jp.fujitsu.com: fix up new shrinker API] [akpm@linux-foundation.org: fix xfs warning] [akpm@linux-foundation.org: update gfs2] Signed-off-by:
Ying Han <yinghan@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Minchan Kim <minchan.kim@gmail.com> Acked-by:
Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Acked-by:
Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 24 Mar, 2011 1 commit
-
-
Bryan Schumaker authored
A later patch will need to perform a lookup using an alternate client with a different security flavor. This patch adds support for doing that on NFS v4. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 23 Mar, 2011 3 commits
-
-
Bryan Schumaker authored
Some filesystems (such as ext4) can return the same cookie value for multiple files. If we try to start a readdir with one of these cookies, the server will return the first file found with a cookie of the same value. This can cause the client to enter an infinite loop. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
nfs_opendir() created a context that held much more information than we need for a readdir. This patch introduces a slimmed-down nfs_open_dir_context that contains only the cookie and the cred used for RPC operations. The new context will eventually be used to help detect readdir loops. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
If we're doing a search by readdir cookie, we need to ensure that the resulting f_pos is updated. To do so, we need to update the desc->current_index, in the same way that we do in the search by file offset case. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 16 Mar, 2011 1 commit
-
-
Al Viro authored
part 2: make sure that disconnected roots have corresponding mnt_devname values stashed into them. Have nfs*_get_root() stuff a copy of devname into ->d_fsdata of the found root, provided that it is disconnected. Have ->d_release() free it when dentry goes away. Have the places where NFS uses ->d_fsdata for sillyrename (and that can *never* happen to a disconnected root - dentry will be attached to its parent) free old devname copies if they find those. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 16 Jan, 2011 1 commit
-
-
David Howells authored
Make NFS use the new d_automount() dentry operation rather than abusing follow_link() on directories. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by:
Ian Kent <raven@themaw.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 14 Jan, 2011 1 commit
-
-
Nick Piggin authored
Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-
- 13 Jan, 2011 2 commits
-
-
Trond Myklebust authored
Commit c0204fd2 (NFS: Clean up nfs4_proc_create()) broke NFSv3 exclusive open by removing the code that passes the O_EXCL flag down to nfs3_proc_create(). This patch reverts that offending hunk from the original commit. Reported-by:
Nick Bowler <nbowler@elliptictech.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org [2.6.37] Tested-by:
Nick Bowler <nbowler@elliptictech.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 10 Jan, 2011 1 commit
-
-
Trond Myklebust authored
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:
Trond Myklebust <Trond.Myklebust@netapp.com> Tested-by:
Marc Kleine-Budde <mkl@pengutronix.de> Cc: stable@kernel.org [2.6.37]
-
- 07 Jan, 2011 4 commits
-
-
Nick Piggin authored
Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-
Nick Piggin authored
Require filesystems be aware of .d_revalidate being called in rcu-walk mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning -ECHILD from all implementations. Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-
Nick Piggin authored
Reduce some branches and memory accesses in dcache lookup by adding dentry flags to indicate common d_ops are set, rather than having to check them. This saves a pointer memory access (dentry->d_op) in common path lookup situations, and saves another pointer load and branch in cases where we have d_op but not the particular operation. Patched with: git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-
Nick Piggin authored
dcache_lock no longer protects anything. remove it. Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-