summaryrefslogtreecommitdiffstats
path: root/fs/nfs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2010-08-103-6/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits) no need for list_for_each_entry_safe()/resetting with superblock list Fix sget() race with failing mount vfs: don't hold s_umount over close_bdev_exclusive() call sysv: do not mark superblock dirty on remount sysv: do not mark superblock dirty on mount btrfs: remove junk sb_dirt change BFS: clean up the superblock usage AFFS: wait for sb synchronization when needed AFFS: clean up dirty flag usage cifs: truncate fallout mbcache: fix shrinker function return value mbcache: Remove unused features add f_flags to struct statfs(64) pass a struct path to vfs_statfs update VFS documentation for method changes. All filesystems that need invalidate_inode_buffers() are doing that explicitly convert remaining ->clear_inode() to ->evict_inode() Make ->drop_inode() just return whether inode needs to be dropped fs/inode.c:clear_inode() is gone fs/inode.c:evict() doesn't care about delete vs. non-delete paths now ... Fix up trivial conflicts in fs/nilfs2/super.c
| * convert remaining ->clear_inode() to ->evict_inode()Al Viro2010-08-093-6/+15
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'nfs-for-2.6.36' of ↵Linus Torvalds2010-08-0722-381/+624
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.linux-nfs.org/projects/trondmy/nfs-2.6 * 'nfs-for-2.6.36' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (42 commits) NFS: NFSv4.1 is no longer a "developer only" feature NFS: NFS_V4 is no longer an EXPERIMENTAL feature NFS: Fix /proc/mount for legacy binary interface NFS: Fix the locking in nfs4_callback_getattr SUNRPC: Defer deleting the security context until gss_do_free_ctx() SUNRPC: prevent task_cleanup running on freed xprt SUNRPC: Reduce asynchronous RPC task stack usage SUNRPC: Move the bound cred to struct rpc_rqst SUNRPC: Clean up of rpc_bindcred() SUNRPC: Move remaining RPC client related task initialisation into clnt.c SUNRPC: Ensure that rpc_exit() always wakes up a sleeping task SUNRPC: Make the credential cache hashtable size configurable SUNRPC: Store the hashtable size in struct rpc_cred_cache NFS: Ensure the AUTH_UNIX credcache is allocated dynamically NFS: Fix the NFS users of rpc_restart_call() SUNRPC: The function rpc_restart_call() should return success/failure NFSv4: Get rid of the bogus RPC_ASSASSINATED(task) checks NFSv4: Clean up the process of renewing the NFSv4 lease NFSv4.1: Handle NFS4ERR_DELAY on SEQUENCE correctly NFS: nfs_rename() should not have to flush out writebacks ...
| * | NFS: NFSv4.1 is no longer a "developer only" featureTrond Myklebust2010-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | Mark it as 'experimental' instead, since in practice, NFSv4.1 should now be relatively stable. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: NFS_V4 is no longer an EXPERIMENTAL featureTrond Myklebust2010-08-061-3/+3
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: Fix /proc/mount for legacy binary interfaceBryan Schumaker2010-08-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flag so we know if we mounted the NFS server using the legacy binary interface. If we used the legacy interface, then we should not show the mountd options. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: Fix the locking in nfs4_callback_getattrTrond Myklebust2010-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The delegation is protected by RCU now, so we need to replace the nfsi->rwsem protection with an rcu protected section. Reported-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | SUNRPC: Move the bound cred to struct rpc_rqstTrond Myklebust2010-08-043-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | This will allow us to save the original generic cred in rpc_message, so that if we migrate from one server to another, we can generate a new bound cred without having to punt back to the NFS layer. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: Fix the NFS users of rpc_restart_call()Trond Myklebust2010-08-032-7/+4
| | | | | | | | | | | | | | | | | | | | | Fix up those functions that depend on knowing whether or not rpc_restart_call is successful or not. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Get rid of the bogus RPC_ASSASSINATED(task) checksTrond Myklebust2010-08-031-10/+0
| | | | | | | | | | | | | | | | | | | | | There is no real reason to have RPC_ASSASSINATED() checks in the NFS code. As far as it is concerned, this is just an RPC error... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Clean up the process of renewing the NFSv4 leaseTrond Myklebust2010-08-031-14/+9
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: Handle NFS4ERR_DELAY on SEQUENCE correctlyTrond Myklebust2010-08-031-30/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In RFC5661, an NFS4ERR_DELAY error on a SEQUENCE operation has the special meaning that the server is not finished processing the request. In this case we want to just retry the request without touching the slot. Also fix a bug whereby we would fail to update the sequence id if the server returned any error other than NFS_OK/NFS4ERR_DELAY. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: nfs_rename() should not have to flush out writebacksTrond Myklebust2010-08-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | We don't really support nfs servers that invalidate the file handle after a rename, so precautions such as flushing out dirty data before renaming the file are superfluous. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: Clean up the callers of nfs_wb_all()Trond Myklebust2010-08-032-12/+2
| | | | | | | | | | | | | | | | | | There is no need to flush out writes before calling nfs_wb_all(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFS: Fix up the fsync codeTrond Myklebust2010-08-031-30/+21
| | | | | | | | | | | | | | | | | | | | | | | | Christoph points out that the VFS will always flush out data before calling nfs_fsync(), so we can dispense with a full call to nfs_wb_all(), and replace that with a simpler call to nfs_commit_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Ensure the lockowners are labelled using the fl_owner and/or fl_pidTrond Myklebust2010-07-304-14/+50
| | | | | | | | | | | | | | | | | | | | | flock locks want to be labelled using the process pid, while posix locks want to be labelled using the fl_owner. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Add support for the RELEASE_LOCKOWNER operationTrond Myklebust2010-07-304-0/+86
| | | | | | | | | | | | | | | | | | | | | This is needed by NFSv4.0 servers in order to keep the number of locking stateids at a manageable level. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Clean up for lockowner XDR encodingTrond Myklebust2010-07-301-12/+20
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Ensure that we track the NFSv4 lock state in read/write requests.Trond Myklebust2010-07-306-17/+104
| | | | | | | | | | | | | | | | | | | | | This patch fixes bugzilla entry 14501: https://bugzilla.kernel.org/show_bug.cgi?id=14501 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Clean up struct nfs4_state_ownerTrond Myklebust2010-06-243-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'so_delegations' list appears to be unused. Also eliminate so_client. If we already have so_server, we can get to the nfs_client structure. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: There is no need to init the session more than once...Trond Myklebust2010-06-222-1/+7
| | | | | | | | | | | | | | | | | | Set up a flag to ensure that is indeed the case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Cleanup for nfs4_alloc_session.Trond Myklebust2010-06-222-7/+7
| | | | | | | | | | | | | | | | | | | | | There is no reason to change the nfs_client state every time we allocate a new session. Move that line into nfs4_init_client_minor_version. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Clean up exclusive createTrond Myklebust2010-06-221-11/+6
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Deprecate nfs_client->cl_minorversionTrond Myklebust2010-06-221-5/+5
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Fix nfs_async_inode_return_delegation() uglinessTrond Myklebust2010-06-225-19/+8
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Convert the various reboot recovery ops etc to minor version opsTrond Myklebust2010-06-224-38/+18
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Clean up the NFSv4.1 minor version specific operationsTrond Myklebust2010-06-223-9/+37
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Don't store session state in the nfs_client->cl_stateTrond Myklebust2010-06-223-5/+10
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Further cleanup for nfs4_sequence_doneTrond Myklebust2010-06-221-9/+12
| | | | | | | | | | | | | | | | | | | | | Instead of testing if the nfs_client has a session, we should be testing if the struct nfs4_sequence_res was set up with one. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: Make nfs4_setup_sequence take a nfs_server argumentTrond Myklebust2010-06-225-28/+43
| | | | | | | | | | | | | | | | | | | | | | | | In anticipation of the day when we have per-filesystem sessions, and also in order to allow the session to change in the event of a filesystem migration event. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: Merge the nfs41_proc_async_sequence() and nfs4_proc_sequence()Trond Myklebust2010-06-221-24/+44
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4: Kill nfs4_async_handle_error() abuses by NFSv4.1Trond Myklebust2010-06-221-37/+41
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: Simplify nfs41_sequence_done()Trond Myklebust2010-06-221-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody uses the rpc_status parameter. It is not obvious why we need the struct nfs_client argument either, when we already have that information in the session. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv4.1: Clean up nfs4_setup_sequenceTrond Myklebust2010-06-221-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, there is little point in first zeroing out the entire struct nfs4_sequence_res, and then initialising all fields save one. Just initialise the last field to zero... Secondly, nfs41_setup_sequence() has only 2 possible return values: 0, or -EAGAIN, so there is no 'terminate rpc task' case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | NFSv41: Fix a memory leak in nfs41_proc_async_sequence()Trond Myklebust2010-06-221-18/+21
| | | | | | | | | | | | | | | | | | | | | If the call to rpc_call_async() fails, then the arguments will not be freed, since there will be no call to nfs41_sequence_call_done Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | vfs: re-introduce MAY_CHDIREric Paris2010-08-021-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Currently MAY_ACCESS means that filesystems must check the permissions right then and not rely on cached results or the results of future operations on the object. This can be because of a call to sys_access() or because of a call to chdir() which needs to check search without relying on any future operations inside that dir. I plan to use MAY_ACCESS for other purposes in the security system, so I split the MAY_ACCESS and the MAY_CHDIR cases. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen D. Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
* | NFS: Fix a typo in include/linux/nfs_fs.hTrond Myklebust2010-08-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | nfs_commit_inode() needs to be defined irrespectively of whether or not we are supporting NFSv3 and NFSv4. Allow the compiler to optimise away code in the NFSv2-only case by converting it into an inlined stub function. Reported-and-tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | NFS: Ensure that writepage respects the nonblock flagTrond Myklebust2010-07-301-6/+17
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: kswapd must not block in nfs_release_pageTrond Myklebust2010-07-302-4/+13
| | | | | | | | | | | | | | | | | | | | | | See https://bugzilla.kernel.org/show_bug.cgi?id=16056 If other processes are blocked waiting for kswapd to free up some memory so that they can make progress, then we cannot allow kswapd to block on those processes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
* | nfs: include space for the NUL in root pathDan Carpenter2010-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In root_nfs_name() it does the following: if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) { printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n"); return -1; } sprintf(nfs_export_path, buf, cp); In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN) then the sprintf() would lead to an overflow. Generally the rest of the code assumes that the path can have NFS_MAXPATHLEN (1024) characters and a NUL terminator so the fix is to add space to the nfs_export_path[] buffer. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | mm: add context argument to shrinker callbackDave Chinner2010-07-192-2/+3
|/ | | | | | | | | | | | The current shrinker implementation requires the registered callback to have global state to work from. This makes it difficult to shrink caches that are not global (e.g. per-filesystem caches). Pass the shrinker structure to the callback so that users can embed the shrinker structure in the context the shrinker needs to operate on and get back to it in the callback via container_of(). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
* NFSv4: Fix an embarassing typo in encode_attrs()Trond Myklebust2010-06-221-2/+2
| | | | | | | | | Apparently, we have never been able to set the atime correctly from the NFSv4 client. Reported-by: 小倉一夫 <ka-ogura@bd6.so-net.ne.jp> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
* NFSv4: Ensure that /proc/self/mountinfo displays the minor version numberTrond Myklebust2010-06-221-4/+18
| | | | | | | | Currently, we do not display the minor version mount parameter in the /proc mount info. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
* NFSv4.1: Ensure that we initialise the session when following a referralTrond Myklebust2010-06-221-71/+51
| | | | | | | Put the code that is common to both the referral and ordinary mount cases into a common helper routine. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* nfs4 use mandatory attribute file type in nfs4_get_rootAndy Adamson2010-06-221-1/+1
| | | | | | | | | S_ISDIR(fsinfo.fattr->mode) checks the file type rather than the mode bits, so we should be checking for the NFS_ATTR_FATTR_TYPE fattr property. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
* drop unused dentry argument to ->fsyncChristoph Hellwig2010-05-272-4/+7
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* NFS: Fix another nfs_wb_page() deadlockTrond Myklebust2010-05-261-2/+5
| | | | | | | | | | | J.R. Okajima reports that the call to sync_inode() in nfs_wb_page() can deadlock with other writeback flush calls. It boils down to the fact that we cannot ever call writeback_single_inode() while holding a page lock (even if we do set nr_to_write to zero) since another process may already be waiting in the call to do_writepages(), and so will deny us the I_SYNC lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Ensure that we mark the inode as dirty if we exit early from commitTrond Myklebust2010-05-261-2/+11
| | | | | | | | | If we exit from nfs_commit_inode() without ensuring that the COMMIT rpc call has been completed, we must re-mark the inode as dirty. Otherwise, future calls to sync_inode() with the WB_SYNC_ALL flag set will fail to ensure that the data is on the disk. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix a lock imbalance typo in nfs_access_cache_shrinkerTrond Myklebust2010-05-261-0/+1
| | | | | | | | | Commit 9c7e7e23371e629dbb3b341610a418cdf1c19d91 (NFS: Don't call iput() in nfs_access_cache_shrinker) unintentionally removed the spin unlock for the inode->i_lock. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, ↵Alexey Dobriyan2010-05-251-2/+2
| | | | | | | | | | | | | | | | SHRT_MAX and SHRT_MIN - C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud