aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
| * | | | SUNRPC: Reorder the struct rpc_task fieldsTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the packing of the rpc_task, and ensures that on 64-bit platforms the size reduces to 216 bytes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Remove the 'tk_magic' debugging fieldTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has not triggered in almost a decade. Time to get rid of it... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Move the task->tk_bytes_sent and tk_rtt to struct rpc_rqstTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems strange to maintain stats for bytes_sent in one structure, and bytes received in another. Try to assemble all the RPC request-related stats in struct rpc_rqst Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Don't call iput() in nfs_access_cache_shrinkerTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iput() can potentially attempt to allocate memory, so we should avoid calling it in a memory shrinker. Instead, rely on the fact that iput() will call nfs_access_zap_cache(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Clean up nfs_access_zap_cache()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Don't run nfs_access_cache_shrinker() when the mask is GFP_NOFSTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both iput() and put_rpccred() might allocate memory under certain circumstances, so make sure that we don't recurse and deadlock... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Ensure rpcauth_prune_expired() respects the nr_to_scan parameterTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Ensure memory shrinker doesn't waste time in rpcauth_prune_expired()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'cred_unused' list, that is traversed by rpcauth_cache_shrinker is ordered by time. If we hit a credential that is under the 60 second garbage collection moratorium, we should exit because we know at that point that all successive credentials are subject to the same moratorium... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Dont run rpcauth_cache_shrinker() when gfp_mask is GFP_NOFSTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under some circumstances, put_rpccred() can end up allocating memory, so check the gfp_mask to prevent deadlocks. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Read requests can use GFP_KERNEL.Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no danger of deadlock should the allocation trigger page writeback. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Clean up nfs_create_request()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no point in looping if we're out of memory. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Don't use GFP_KERNEL in rpcsec_gss downcallsTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Again, we can deadlock if the memory reclaim triggers a writeback that requires a rpcsec_gss credential lookup. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Don't use GFP_KERNEL allocations in state recoveryTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not want to have the state recovery thread kick off and wait for a memory reclaim, since that may deadlock when the writebacks end up waiting for the state recovery thread to complete. The safe thing is therefore to use GFP_NOFS in all open, close, delegation return, lock, etc. operations that may be called by the state recovery thread. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Fix xs_setup_bc_tcp()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a BUG for anybody to call this function without setting args->bc_xprt. Trying to return an error value is just wrong, since the user cannot fix this: it is a programming error, not a user error. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Replace jiffies-based metrics with ktime-based metricsChuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently RPC performance metrics that tabulate elapsed time use jiffies time values. This is problematic on systems that use slow jiffies (for instance 100HZ systems built for paravirtualized environments). It is also a problem for computing precise latency statistics for advanced network transports, such as InfiniBand, that can have round-trip latencies significanly faster than a single clock tick. For the RPC client, adopt the high resolution time stamp mechanism already used by the network layer and blktrace: ktime. We use ktime format time stamps for all internal computations, and convert to milliseconds for presentation. As a result, we need only addition operations in the performance critical paths; multiply/divide is required only for presentation. We could report RTT metrics in microseconds. In fact the mountstats format is versioned to accomodate exactly this kind of interface improvement. For now, however, we'll stay with millisecond precision for presentation to maintain backwards compatibility with the handful of currently deployed user space tools. At a later point, we'll move to an API such as BDI_STATS where a finer timestamp precision can be reported. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | ktime: introduce ktime_to_ms()Chuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To report ktime statistics to user space in milliseconds, a new helper is required. When considering how to do this conversion, I didn't immediately see why the extra step of converting ktime to a timeval was needed. To make that more clear, introduce a couple of large comments. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: RPC metrics and RTT estimator should use same RTT valueChuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compute an RPC request's RTT once, and use that value both for reporting RPC metrics, and for adjusting the RTT context used by the RPC client's RTT estimator algorithm. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Calldata for nfs4_renew_done()Chuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm about to change task->tk_start from a jiffies value to a ktime_t value in order to make RPC RTT reporting more precise. Recently (commit dc96aef9) nfs4_renew_done() started to reference task->tk_start so that a jiffies value no longer had to be passed from nfs4_proc_async_renew(). This allowed the calldata to point to an nfs_client instead. Changing task->tk_start to a ktime_t value makes it effectively useless for renew timestamps, so we need to restore the pre-dc96aef9 logic that provided a jiffies "start" timestamp to nfs4_renew_done(). Both an nfs_client pointer and a timestamp need to be passed to nfs4_renew_done(), so create a new nfs_renewdata structure that contains both, resembling what is already done for delegreturn, lock, and unlock. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Squelch compiler warning in nfs_add_server_stats()Chuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up: fs/nfs/iostat.h: In function ‘nfs_add_server_stats’: fs/nfs/iostat.h:41: warning: comparison between signed and unsigned integer expressions fs/nfs/iostat.h:41: warning: comparison between signed and unsigned integer expressions fs/nfs/iostat.h:41: warning: comparison between signed and unsigned integer expressions fs/nfs/iostat.h:41: warning: comparison between signed and unsigned integer expressions Commit fce22848 replaced the open-coded per-cpu logic in several functions in fs/nfs/iostat.h with a single invocation of this_cpu_ptr(). This macro assumes its second argument is signed, not unsigned. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Clean up fscache_uniq mount optionChuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up: fscache_uniq takes a string, so it should be included with the other string mount option definitions, by convention. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Squelch compiler warningChuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seen with -Wextra: /home/cel/linux/fs/nfs/fscache.c: In function ‘__nfs_readpages_from_fscache’: /home/cel/linux/fs/nfs/fscache.c:479: warning: comparison between signed and unsigned integer expressions The comparison implicitly converts "int" to "unsigned", making it safe. But there's no need for the implicit type conversions here, and the dfprintk() already uses a "%u" formatter for "npages." Better to reduce confusion. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Trivial cleanups in include/linux/sunrpc/xdr.hChuck Lever2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up: Update the documenting comment, and fix some minor white space issues. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Clean up the NFSv4 setclientid operationTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Allow attribute caching with 'noac' mounts if client holds a delegationTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the server has given us a delegation on a file, we _know_ that we can cache the attribute information even when the user has specified 'noac'. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Fail over more quickly on connect errorsTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not allow soft tasks to wait for longer than the major timeout period when waiting for a reconnect to occur. Remove the field xprt->connect_timeout since it has been obsoleted by xprt->reestablish_timeout. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Move the test for XPRT_CONNECTING into xprt_connect()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug with setting xprt->stat.connect_start. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Cleanup - make rpc_new_task() call rpc_release_calldata on failureTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also have it return an ERR_PTR(-ENOMEM) instead of a null pointer. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | SUNRPC: Clean up xprt_release()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Fix up the documentation for nfs_do_refmountTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Replace nfsroot on-stack filehandleTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Cleanup file handle allocations in fs/nfs/super.cTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new helper functions instead of open coding. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Prevent the mount code from looping forever on broken exportsTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep a global count of how many referrals that the current task has traversed on a path lookup. Return ELOOP if the count exceeds MAX_NESTED_LINKS. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs3_proc_getacl() and nfs3_proc_setacl()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs_statfs()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs_setattr()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs4_proc_create()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the O_EXCL open handling into _nfs4_do_open() where it belongs. Doing so also allows us to reuse the struct fattr from the opendata. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_proc_symlink()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_proc_createTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_rmdirTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs_proc_remove()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs3_proc_readlink()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_link()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs_readdir()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs3_proc_rename() and nfs4_proc_rename()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce stack footprint of nfs_revalidate_inode()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Reduce stack footprint of nfs4_proc_access() and nfs3_proc_access()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Reduce the stack footprint of nfs4_remote_referral_get_sbTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFSv4: Reduce stack footprint of nfs4_get_root()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_follow_remote_path()Trond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * | | | NFS: Reduce the stack footprint of nfs_lookupTrond Myklebust2010-05-14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>