summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.linux-nfs.org/pub/linux/nfs-2.6Linus Torvalds2007-10-1526-846/+787
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-nfs.org/pub/linux/nfs-2.6: (131 commits) NFSv4: Fix a typo in nfs_inode_reclaim_delegation NFS: Add a boot parameter to disable 64 bit inode numbers NFS: nfs_refresh_inode should clear cache_validity flags on success NFS: Fix a connectathon regression in NFSv3 and NFSv4 NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inode SUNRPC: Don't call xprt_release in call refresh SUNRPC: Don't call xprt_release() if call_allocate fails SUNRPC: Fix buggy UDP transmission [23/37] Clean up duplicate includes in [2.6 patch] net/sunrpc/rpcb_clnt.c: make struct rpcb_program static SUNRPC: Use correct type in buffer length calculations SUNRPC: Fix default hostname created in rpc_create() nfs: add server port to rpc_pipe info file NFS: Get rid of some obsolete macros NFS: Simplify filehandle revalidation NFS: Ensure that nfs_link() returns a hashed dentry NFS: Be strict about dentry revalidation when doing exclusive create NFS: Don't zap the readdir caches upon error NFS: Remove the redundant nfs_reval_fsid() NFSv3: Always use directory post-op attributes in nfs3_proc_lookup ... Fix up trivial conflict due to sock_owned_by_user() cleanup manually in net/sunrpc/xprtsock.c
| * NFSv4: Fix a typo in nfs_inode_reclaim_delegationTrond Myklebust2007-10-111-1/+3
| | | | | | | | | | | | | | | | | | We were intending to put the previous instance of delegation->cred before setting a new one. Thanks to David Howells for spotting this. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Add a boot parameter to disable 64 bit inode numbersTrond Myklebust2007-10-092-2/+28
| | | | | | | | | | | | | | | | 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>
| * NFS: nfs_refresh_inode should clear cache_validity flags on successTrond Myklebust2007-10-091-18/+17
| | | | | | | | | | | | | | If the cached attributes match the ones supplied in the fattr, then assume we've revalidated the inode. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix a connectathon regression in NFSv3 and NFSv4Trond Myklebust2007-10-092-7/+13
| | | | | | | | | | | | | | | | | | We're failing basic test6 against Linux servers because they lack a correct change attribute. The fix is to assume that we always want to invalidate the readdir caches when we call update_changeattr and/or nfs_post_op_update_inode on a directory. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inodeTrond Myklebust2007-10-092-5/+3
| | | | | | | | | | | | | | nfs_post_op_update_inode() is really only meant to be used if we expect the inode and its attributes to have changed in some way. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Get rid of some obsolete macrosTrond Myklebust2007-10-092-3/+3
| | | | | | | | | | | | | | - 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>
| * NFS: Simplify filehandle revalidationTrond Myklebust2007-10-091-0/+1
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Ensure that nfs_link() returns a hashed dentryTrond Myklebust2007-10-091-1/+2
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Be strict about dentry revalidation when doing exclusive createTrond Myklebust2007-10-091-15/+14
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't zap the readdir caches upon errorTrond Myklebust2007-10-091-2/+0
| | | | | | | | | | | | If necessary, the caches will get zapped under normal revalidation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Remove the redundant nfs_reval_fsid()Trond Myklebust2007-10-091-15/+0
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv3: Always use directory post-op attributes in nfs3_proc_lookupTrond Myklebust2007-10-091-2/+1
| | | | | | | | | | | | | | LOOKUP returns the directory post-op attributes whether or not the operation was successful. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Fix nfs_atomic_open() to set the verifier on negative dentries tooTrond Myklebust2007-10-092-9/+6
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidateTrond Myklebust2007-10-091-1/+5
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Don't revalidate the directory in nfs_atomic_lookup()Trond Myklebust2007-10-091-8/+0
| | | | | | | | | | | | Why bother, since the call to nfs4_atomic_open() will do it for us. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Optimise nfs_lookup_revalidate()Trond Myklebust2007-10-091-7/+8
| | | | | | | | | | | | | | We don't need to call nfs_revalidate_inode() on the directory if we already know that the verifiers don't match. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Reset nfsi->last_updated only if the attribute changedTrond Myklebust2007-10-091-5/+12
| | | | | | | | | | | | | | Otherwise set it to nfsi->read_cache_jiffies in order to prevent jiffy wraparound issues. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Remove nfs_begin_data_update/nfs_end_data_updateTrond Myklebust2007-10-096-64/+1
| | | | | | | | | | | | | | 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-20/+1
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Remove bogus nfs_mark_for_revalidate() in nfs_lookupTrond Myklebust2007-10-091-6/+0
| | | | | | | | | | | | The parent of the newly materialised dentry has just been revalidated... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: don't cache the verifer across ->lookup() callsTrond Myklebust2007-10-091-6/+2
| | | | | | | | | | | | | | | | If the ->lookup() call causes the directory verifier to change, then there is still no need to use the old verifier, since our dentry has been verified. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: nfs_post_op_update_inode don't update cache_change_attributeTrond Myklebust2007-10-091-11/+7
| | | | | | | | | | | | | | | | If nfs_post_op_update_inode fails because the server didn't return any attributes, then we let the subsequent inode revalidation update cache_change_attribute. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't revalidate dentries on directory size or ctime changesTrond Myklebust2007-10-091-4/+1
| | | | | | | | | | | | We only need to look at the mtime changes... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't set cache_change_attribute in nfs_revalidate_mappingTrond Myklebust2007-10-091-4/+1
| | | | | | | | | | | | | | The attribute revalidation code will already have taken care of resetting nfsi->cache_change_attribute. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix a bug in nfs_open_revalidate()Trond Myklebust2007-10-091-1/+1
| | | | | | | | | | | | | | We want to set the verifier when the call to nfs4_open_revalidate() _succeeds_. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't hash the negative dentry when optimising for an O_EXCL openTrond Myklebust2007-10-092-3/+5
| | | | | | | | | | | | | | We don't want to leave an unverified hashed negative dentry if the exclusive create fails to complete. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: nfs_instantiate() should set the dentry verifierTrond Myklebust2007-10-091-3/+1
| | | | | | | | | | | | | | That will also allow us to remove the calls in mknod and mkdir. In addition it will ensure that symlinks set it correctly. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Ensure nfs_instantiate() invalidates the parent dir on errorTrond Myklebust2007-10-091-8/+15
| | | | | | | | | | | | Also ensure that it drops the dentry in this case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix nfs_verify_change_attribute()Trond Myklebust2007-10-091-1/+1
| | | | | | | | | | | | | | | | | | 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: Fake up 'wcc' attributes to prevent cache invalidation after writeTrond Myklebust2007-10-094-3/+37
| | | | | | | | | | | | | | | | | | 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: Remove bogus check of cache_change_attribute in nfs_update_inodeTrond Myklebust2007-10-091-12/+3
| | | | | | | | | | | | | | | | Remove the bogus 'data_stable' check in nfs_update_inode. The cache_change_attribute tells you if the directory changed on the server, and should have nothing to do with the file length. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix the ESTALE "revalidation" in _nfs_revalidate_inode()Trond Myklebust2007-10-091-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | For one thing, the test NFS_ATTRTIMEO() == 0 makes no sense: we're testing whether or not the cache timeout length is zero, which is totally unrelated to the issue of whether or not we trust the file staleness. Secondly, we do not want to retry the GETATTR once a file has been declared stale by the server: we rather want to discard that inode as soon as possible, since there are broken servers still in use out there that reuse filehandles on new files. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix atime revalidation in read()Trond Myklebust2007-10-094-6/+6
| | | | | | | | | | | | | | | | NFSv3 will correctly update atime on a read() 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: Fix atime revalidation in readdir()Trond Myklebust2007-10-095-6/+15
| | | | | | | | | | | | | | | | 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 use readdirplus data if the page cache is invalidTrond Myklebust2007-10-091-1/+10
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Don't use ctime/mtime for determining when to invalidate the cachesTrond Myklebust2007-10-091-23/+24
| | | | | | | | | | | | In NFSv4 we should only be looking at the change attribute. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't force a dcache revalidation if nfs_wcc_update_inode succeedsTrond Myklebust2007-10-092-10/+8
| | | | | | | | | | | | | | | | 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: nfs_wcc_update_inode: directory caches are always invalidatedTrond Myklebust2007-10-091-0/+2
| | | | | | | | | | | | | | We must ensure that the readdir data is always invalidated whether or not the weak cache consistency data update succeeds. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix dcache revalidation bugsTrond Myklebust2007-10-092-8/+3
| | | | | | | | | | | | | | | | | | | | | | We don't need to force a dentry lookup just because we're making changes to the directory. Don't update nfsi->cache_change_attribute in nfs_end_data_update: that overrides the NFSv3/v4 weak consistency checking that tells us our update was the only one, and that tells us the dcache is still valid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: fix nfs_verify_change_attributeTrond Myklebust2007-10-091-4/+0
| | | | | | | | | | | | | | | | | | 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>
| * NFS: nfs_post_op_update_inode() should call nfs_refresh_inode()Trond Myklebust2007-10-091-3/+3
| | | | | | | | | | | | Ensure that we don't clobber the results from a more recent getattr call... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Fix over-conservative attribute invalidation in nfs_update_inode()Trond Myklebust2007-10-091-4/+3
| | | | | | | | | | | | | | We should always be declaring the attribute cache as valid after having updated it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Make NFSv4 ACCESS calls return attributes too...Trond Myklebust2007-10-092-9/+29
| | | | | | | | | | | | | | It doesn't really make sense to cache an access call without also revalidating the attributes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFSv4: Simplify _nfs4_do_access()Trond Myklebust2007-10-092-35/+22
| | | | | | | | | | | | | | | | 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-099-21/+19
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Eliminate nfs_refresh_verifier()Chuck Lever2007-10-091-11/+5
| | | | | | | | | | | | | | | | nfs_set_verifier() and nfs_refresh_verifier() do exactly the same thing, so replace one with the other. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Eliminate nfs_renew_times()Chuck Lever2007-10-091-20/+0
| | | | | | | | | | | | | | | | | | | | The nfs_renew_times() function plants the current time in jiffies in dentry->d_time. But a call to nfs_renew_times() is always followed by another call that overwrites dentry->d_time. Get rid of the nfs_renew_times() calls. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: Don't call nfs_renew_times() in nfs_dentry_iput()Chuck Lever2007-10-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Negative dentries need to be reverified after an asynchronous unlink. Quoth Trond: "Unfortunately I don't think that we can avoid revalidating the resulting negative dentry since the UNLINK call is asynchronous, and so the new verifier on the directory will only be known a posteriori." Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud