summaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
Commit message (Collapse)AuthorAgeFilesLines
* make nfs_automount_list staticAdrian Bunk2008-04-191-1/+0
| | | | | | | nfs_automount_list can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Ensure that the write code cleans up properly when rpc_run_task() failsTrond Myklebust2008-04-191-2/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix the fsid revalidation in nfs_update_inode()Trond Myklebust2008-03-071-0/+1
| | | | | | | | | When we detect that we've crossed a mountpoint on the remote server, we must take care not to use that inode to revalidate the fsid on our current superblock. To do so, we label the inode as a remote mountpoint, and check for that in nfs_update_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* Merge branch 'task_killable' of ↵Linus Torvalds2008-02-011-8/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc * 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: (22 commits) Remove commented-out code copied from NFS NFS: Switch from intr mount option to TASK_KILLABLE Add wait_for_completion_killable Add wait_event_killable Add schedule_timeout_killable Use mutex_lock_killable in vfs_readdir Add mutex_lock_killable Use lock_page_killable Add lock_page_killable Add fatal_signal_pending Add TASK_WAKEKILL exit: Use task_is_* signal: Use task_is_* sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL ptrace: Use task_is_* power: Use task_is_* wait: Use TASK_NORMAL proc/base.c: Use task_is_* proc/array.c: Use TASK_REPORT perfmon: Use task_is_* ... Fixed up conflicts in NFS/sunrpc manually..
| * NFS: Switch from intr mount option to TASK_KILLABLEMatthew Wilcox2007-12-061-8/+1
| | | | | | | | | | | | | | | | | | By using the TASK_KILLABLE infrastructure, we can get rid of the 'intr' mount option. We have to use _killable everywhere instead of _interruptible as we get rid of rpc_clnt_sigmask/sigunmask. Signed-off-by: Liam R. Howlett <howlett@gmail.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* | nfs: convert NFS_*(inode) helpers to static inlineBenny Halevy2008-01-301-18/+58
| | | | | | | | | | Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | nfs: obliterate NFS_FLAGS macroBenny Halevy2008-01-301-3/+2
| | | | | | | | | | | | | | use NFS_I(inode)->flags instead Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: define a function to update nfsi->cache_change_attributeTrond Myklebust2008-01-301-0/+1
|/ | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: make nfs_wb_page_priority() staticAdrian Bunk2007-11-261-1/+0
| | | | | | | | | | nfs_wb_page_priority() can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix a race in sillyrenameTrond Myklebust2007-10-191-0/+8
| | | | | | | | | | | | | | | | | lookup() and sillyrename() can race one another because the sillyrename() completion cannot take the parent directory's inode->i_mutex since the latter may be held by whoever is calling dput(). We therefore have little option but to add extra locking to ensure that nfs_lookup() and nfs_atomic_open() do not race with the sillyrename completion. If somebody has looked up the sillyrenamed file in the meantime, we just transfer the sillydelete information to the new dentry. Please refer to the bug-report at http://bugzilla.linux-nfs.org/show_bug.cgi?id=150 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add a boot parameter to disable 64 bit inode numbersTrond Myklebust2007-10-091-0/+1
| | | | | | | | This boot parameter will allow legacy 32-bit applications which call stat() to continue to function even if the NFSv3/v4 server uses 64-bit inode numbers. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [23/37] Clean up duplicate includes inJesper Juhl2007-10-091-2/+0
| | | | | | | | | | Hi, This patch cleans up duplicate includes in include/linux/nfs_fs.h Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Get rid of some obsolete macrosTrond Myklebust2007-10-091-4/+0
| | | | | | | - NFS_READTIME, NFS_CHANGE_ATTR are completely unused. - Inline the few remaining uses of NFS_ATTRTIMEO, and remove. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix nfs_atomic_open() to set the verifier on negative dentries tooTrond Myklebust2007-10-091-0/+5
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remove nfs_begin_data_update/nfs_end_data_updateTrond Myklebust2007-10-091-12/+0
| | | | | | | The lower level routines in fs/nfs/proc.c, fs/nfs/nfs3proc.c and fs/nfs/nfs4proc.c should already be dealing with the revalidation issues. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remove NFS_I(inode)->data_updatesTrond Myklebust2007-10-091-8/+6
| | | | | | We have no more users... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: NFS_CACHEINV() should not test for nfs_caches_unstable()Trond Myklebust2007-10-091-6/+0
| | | | | | | | | | The fact that we're in the process of modifying the inode does not mean that we should not invalidate the attribute and data caches. The defensive thing is to always invalidate when we're confronted with inode mtime/ctime or change_attribute updates that we do not immediately recognise. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: nfs_mark_for_revalidate don't update cache_change_attributeTrond Myklebust2007-10-091-3/+1
| | | | | | Just let the subsequent inode revalidation do the update... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix nfs_verify_change_attribute()Trond Myklebust2007-10-091-7/+7
| | | | | | | | | We don't care about whether or not some other process on our client is changing the directory while we're in nfs_lookup_revalidate(), because the dcache will take care of ensuring local atomicity. We can therefore remove the test for nfs_caches_unstable(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix the sign of the return value of nfs_save_change_attribute()Trond Myklebust2007-10-091-3/+3
| | | | | | Also fix up the comments. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fake up 'wcc' attributes to prevent cache invalidation after writeTrond Myklebust2007-10-091-0/+1
| | | | | | | | | NFSv2 and v4 don't offer weak cache consistency attributes on WRITE calls. In NFSv3, returning wcc data is optional. In all cases, we want to prevent the client from invalidating our cached data whenever ->write_done() attempts to update the inode attributes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix atime revalidation in readdir()Trond Myklebust2007-10-091-0/+1
| | | | | | | | NFSv3 will correctly update atime on a readdir call, so there is no need to set the NFS_INO_INVALID_ATIME flag unless the call to nfs_refresh_inode() fails. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Don't force a dcache revalidation if nfs_wcc_update_inode succeedsTrond Myklebust2007-10-091-1/+3
| | | | | | | | The reason is that if the weak cache consistency update was successful, then we know that our client must be the only one that changed the directory, and we've already updated the dcache to reflect the change. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: fix nfs_verify_change_attributeTrond Myklebust2007-10-091-1/+1
| | | | | | | | | We always want to check that the verifier and directory cache_change_attribute match. This also allows us to remove the 'wraparound hack' for the cache_change_attribute. If we're only checking for equality, then we don't care about wraparound issues. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Simplify _nfs4_do_access()Trond Myklebust2007-10-091-3/+2
| | | | | | | | Currently, _nfs4_do_access() is just a copy of nfs_do_access() with added conversion of the open flags into an access mask. This patch merges the duplicate functionality. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Replace file->private_data with calls to nfs_file_open_context()Trond Myklebust2007-10-091-6/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add a helper to extract the nfs_open_context from a struct fileTrond Myklebust2007-10-091-0/+5
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fall back to synchronous writes when a background write errors...Trond Myklebust2007-10-091-0/+3
| | | | | | | | This helps prevent huge queues of background writes from building up whenever the server runs out of disk or quota space, or if someone changes the file access modes behind our backs. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Clean up NFS writeback flush codeTrond Myklebust2007-10-091-1/+1
| | | | | | | | The only user of nfs_sync_mapping_range() is nfs_getattr(), which uses it to flush out the entire inode without sending a commit. We therefore replace nfs_sync_mapping_range with a more appropriate helper. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Clean up write code...Trond Myklebust2007-10-091-1/+0
| | | | | | | The addition of nfs_page_mkwrite means that We should no longer need to create requests inside nfs_writepage() Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix a write request leak in nfs_invalidate_page()Trond Myklebust2007-09-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ryusuke Konishi says: The recent truncate_complete_page() clears the dirty flag from a page before calling a_ops->invalidatepage(), ^^^^^^ static void truncate_complete_page(struct address_space *mapping, struct page *page) { ... cancel_dirty_page(page, PAGE_CACHE_SIZE); <--- Inserted here at kernel 2.6.20 if (PagePrivate(page)) do_invalidatepage(page, 0); ---> will call a_ops->invalidatepage() ... } and this is disturbing nfs_wb_page_priority() from calling nfs_writepage_locked() that is expected to handle the pending request (=nfs_page) associated with the page. int nfs_wb_page_priority(struct inode *inode, struct page *page, int how) { ... if (clear_page_dirty_for_io(page)) { ret = nfs_writepage_locked(page, &wbc); if (ret < 0) goto out; } ... } Since truncate_complete_page() will get rid of the page after a_ops->invalidatepage() returns, the request (=nfs_page) associated with the page becomes a garbage in nfs_inode->nfs_page_tree. ------------------------ Fix this by ensuring that nfs_wb_page_priority() recognises that it may also need to clear out non-dirty pages that have an nfs_page associated with them. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix put_nfs_open_contextTrond Myklebust2007-08-071-1/+1
| | | | | | | | | | | | | We need to grab the inode->i_lock atomically with the last reference put in order to remove the open context that is being freed from the nfsi->open_files list. Fix by converting the kref to a standard atomic counter and then using atomic_dec_and_lock()... Thanks to Arnd Bergmann for pointing out the problem. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Clean up the sillyrename codeTrond Myklebust2007-07-191-2/+2
| | | | | | | | | | | | | | | Fix a couple of bugs: - Don't rely on the parent dentry still being valid when the call completes. Fixes a race with shrink_dcache_for_umount_subtree() - Don't remove the file if the filehandle has been labelled as stale. Fix a couple of inefficiencies - Remove the global list of sillyrenamed files. Instead we can cache the sillyrename information in the dentry->d_fsdata - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remake nfsroot_mount as a permanent part of NFS clientChuck Lever2007-07-101-3/+2
| | | | | | | | | | | | In preparation for supporting NFSv2 and NFSv3 mount option handling in the kernel NFS client, convert mount_clnt.c to be a permanent part of the NFS client, instead of built only when CONFIG_ROOT_NFS is enabled. In addition, we also replace the "struct sockaddr_in *" argument with something more generic, to help support IPv6 at some later point. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add a new NFS debugging flag just for mount processingChuck Lever2007-07-101-0/+1
| | | | | | | Note to self: fix up /usr/sbin/rpcdebug too Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Clean up nfs_size_to_loff_t()Chuck Lever2007-07-101-5/+3
| | | | | | | Use the same file size limit that lockd uses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Defer inode revalidation when setting up a delegationTrond Myklebust2007-07-101-0/+1
| | | | | | | | | Currently we force a synchronous call to __nfs_revalidate_inode() in nfs_inode_set_delegation(). This not only ensures that we cannot call nfs_inode_set_delegation from an asynchronous context, but it also slows down any call to open(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Replace NFS_I(inode)->req_lock with inode->i_lockTrond Myklebust2007-07-101-1/+0
| | | | | | | There is no justification for keeping a special spinlock for the exclusive use of the NFS writeback code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Convert struct nfs_open_context to use a krefTrond Myklebust2007-07-101-1/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Prevent integer overflow in nfs_scan_list()Trond Myklebust2007-07-101-1/+1
| | | | | | | Also ensure that nfs_inode ncommit and npages are large enough to represent all possible values for the number of pages. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remove the redundant 'dirty' and 'commit' lists from nfs_inodeTrond Myklebust2007-07-101-4/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Replace vfsmount and dentry in nfs_open_context with struct pathTrond Myklebust2007-07-101-2/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix a buffer overflow in the allocation of struct nfs_read/writedataTrond Myklebust2007-04-301-2/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] nfs: fix congestion controlPeter Zijlstra2007-03-161-0/+1
| | | | | | | | | | | | | | | | | | | The current NFS client congestion logic is severly broken, it marks the backing device congested during each nfs_writepages() call but doesn't mirror this in nfs_writepage() which makes for deadlocks. Also it implements its own waitqueue. Replace this by a more regular congestion implementation that puts a cap on the number of active writeback pages and uses the bdi congestion waitqueue. Also always use an interruptible wait since it makes sense to be able to SIGKILL the process even for mounts without 'intr'. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Christoph Lameter <clameter@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/Trond Myklebust2007-02-121-7/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: net/sunrpc/auth_gss/gss_krb5_crypto.c net/sunrpc/auth_gss/gss_spkm3_token.c net/sunrpc/clnt.c Merge with mainline and fix conflicts.
| * [PATCH] mark struct inode_operations const 3Arjan van de Ven2007-02-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | NFS: move NFS_DEBUG definitionBenny Halevy2007-02-031-8/+9
|/ | | | | | | | | | | | | Trond, looks like the changes to include/linux/nfs_fs.h in 2.6.18 that moved the #include's of sunrpc header files into the #ifdef __KERNEL__ block disabled nfs debugging for all nfs c file not including any sunrpc header. The following patch moves the definition down, right before its use for defining ifdebug. Signed-off-by: Benny Halevy <bhalevy@panasas.com> (Moved definition further down into the __KERNEL__ section: Trond) Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] NFS: Fix races in nfs_revalidate_mapping()Trond Myklebust2007-01-241-0/+1
| | | | | | | | Prevent the call to invalidate_inode_pages2() from racing with file writes by taking the inode->i_mutex across the page cache flush and invalidate. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* NFS: Ensure we only call set_page_writeback() under the page lockTrond Myklebust2006-12-061-0/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Ensure that nfs_wb_page() calls writepage when necessary.Trond Myklebust2006-12-061-0/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud