summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-092-8/+8
| | | | | | | | | 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-096-4/+40
| | | | | | | | | 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-096-6/+16
| | | | | | | | 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-093-11/+11
| | | | | | | | 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-092-5/+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>
* 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-093-9/+32
| | | | | | | 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-093-38/+24
| | | | | | | | 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-0910-27/+21
| | | | 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: 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>
* SUNRPC: Fix bytes-per-op accounting for RPC over UDPChuck Lever2007-10-091-0/+1
| | | | | | | | | NFS performance metrics reported zero bytes sent per op when mounting with UDP. The UDP socket transport wasn't properly counting the number of bytes sent. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Show "nointr" mount optionChuck Lever2007-10-091-1/+1
| | | | | | | | The default "intr" setting is different for NFS and NFSv4. To avoid confusion on this issue, don't hide the "nointr" option in /proc/mounts. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Verify server address before invoking in-kernel mount clientChuck Lever2007-10-091-4/+8
| | | | | | | | Re-order mount option sanity checking slightly to ensure we have a valid server address *before* trying to do the mountd RPC call. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Add RDMA dependency to SUNRPC_XPRT_RDMA\"Talpey, Thomas\2007-10-091-1/+1
| | | | | | | | Add a dependency on RDMA before enabling SUNRPC_XPRT_RDMA Yes, "INFINIBAND" also turns on iWARP and other RDMA support. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* RPCRDMA: rpc rdma verbs interface implementation\"Talpey, Thomas\2007-10-091-32/+1621
| | | | | | | | | This implements the interface from rpcrdma to the RDMA verbs interface supported by Infniband and iWARP. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: James Lentini <jlentini@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* RPCRDMA: rpc rdma protocol implementation\"Talpey, Thomas\2007-10-091-4/+863
| | | | | | | | This implements the marshaling and unmarshaling of the rpcrdma transport headers. Connection management is also addressed. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* RPCRDMA: rpc rdma transport switch\"Talpey, Thomas\2007-10-097-0/+1185
| | | | | | | | | | This implements the configuration and building of the core transport switch implementation of the rpcrdma transport. Stubs are provided for the rpcrdma protocol handling, and the infiniband/iwarp verbs interface. These are provided in following patches. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: support RDMA mounts\"Talpey, Thomas\2007-10-092-2/+21
| | | | | | | Adds hooks to the string-based NFS mount to support an "rdma" protocol option. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* RPCRDMA: Kconfig and header file with rpcrdma protocol definitions\"Talpey, Thomas\2007-10-093-0/+209
| | | | | | | | | This file implements the configuration target, protocol template and constants for the rpcrdma transport framing, for use by the xprtrdma rpc transport implementation. Signed-off-by: Tom Talpey <talpey@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS - print accurate transport protocol\"Talpey, Thomas\2007-10-091-14/+2
| | | | | | | Use the per-transport strings to display the transport protocol accurately. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS/SUNRPC: use transport protocol naming\"Talpey, Thomas\2007-10-095-15/+20
| | | | | | | | Instead of an { address family, raw IP protocol number }-tuple, use the newly-defined RPC identifier when creating clients in the upper layers. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS/SUNRPC: support transport protocol naming\"Talpey, Thomas\2007-10-095-13/+19
| | | | | | | | To prepare for including non-sockets-based RPC transports, select RPC transports by an identifier (to be used in following patches). Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: rearrange RPC sockets definitions\"Talpey, Thomas\2007-10-094-23/+42
| | | | | | | | To prepare for including non-sockets-based RPC transports, move the sockets-dependent definitions into their own file. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: rename the rpc_xprtsock_create structure\"Talpey, Thomas\2007-10-094-10/+10
| | | | | | | | To prepare for including non-sockets-based RPC transports, change the overly suggestive name of the transport creation arguments struct. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Finish API to load RPC transport implementations dynamically\"Talpey, Thomas\2007-10-092-16/+57
| | | | | | | | | | | | | Allow RPC client transport implementations to be loaded as needed, or as they become available from distributors or third-party vendors. Note that we leave the IP sockets implementation in sunrpc.o permanently, as IP functionality is always available in any kernel that runs NFS. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Provide a new API for registering transport implementations\"Talpey, Thomas\2007-10-092-0/+86
| | | | | | | | | | | To allow transport capabilities to be loaded dynamically, provide an API for registering and unregistering the transports with the RPC client. Eventually xprt_create_transport() will be changed to search the list of registered transports when initializing a fresh transport. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions\"Talpey, Thomas\2007-10-095-0/+25
| | | | | | | | | | | | | SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions As a preface to allowing arbitrary transport modules to be loaded dynamically, add EXPORT_SYMBOL_GPL for all generic transport functions that a transport implementation might want to use. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: mark bulk read/write data in xdrbuf\"Talpey, Thomas\2007-10-095-1/+11
| | | | | | | | | | Adds a flag word to the xdrbuf struct which indicates any bulk disposition of the data. This enables RPC transport providers to marshal it efficiently/appropriately, and may enable other optimizations. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix a bug in nfs4_validate_mount_data()Trond Myklebust2007-10-091-3/+3
| | | | | | | | | | The previous patch introduced a bug when copying the server address. Also clarify a copy into the auth_flavours array: currently the two size calculations are equivalent, but we may decide to change the size of auth_flavors[] at some point. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: use in-kernel mount argument structure for nfsv4 mounts\"Talpey, Thomas\2007-10-093-100/+81
| | | | | | | | | | The user-visible nfs4_mount_data does not contain sufficient data to describe new mount options, and also is now a legacy structure. Replace it with the internal nfs_parsed_mount_data for nfsv4 in-kernel use. Signed-off-by: Tom Talpey <tmt@netapp.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: use in-kernel mount argument structure for nfsv[23] mounts\"Talpey, Thomas\2007-10-093-75/+70
| | | | | | | | | | The user-visible nfs_mount_data does not contain sufficient data to describe new mount options, and also is now a legacy structure. Replace it with the internal nfs_parsed_mount_data for nfsv[23] in-kernel use. Signed-off-by: Tom Talpey <tmt@netapp.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: move nfs_parsed_mount_data structure definition\"Talpey, Thomas\2007-10-092-31/+33
| | | | | | | | | In preparation for rearranging the nfs mount argument passing, make the nfs_parsed_mount_data struct visible across nfs kernel files. Signed-off-by: Tom Talpey <tmt@netapp.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: export per-transport rpcbind netid's\"Talpey, Thomas\2007-10-093-2/+10
| | | | | | | | The rpcbind (v3+) netid is provided by each RPC client transport. This fixes an omission in IPv6 rpcbind client support, and enables future extension. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: move per-transport rpcbind netid's\"Talpey, Thomas\2007-10-092-23/+16
| | | | | | | Move the TCP/UDP rpcbind netid's from the rpcbind client to a global header. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSD: Convert printk's to dprintk's in NFSD's nfs4xdrChuck Lever2007-10-091-6/+10
| | | | | | | | Due to recent edict to remove or replace printk's that can flood the system log. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud