aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-15Fix the regression created by "set S_DEAD on unlink()..." commitAl Viro5-11/+35
1) i_flags simply doesn't work for mount/unlink race prevention; we may have many links to file and rm on one of those obviously shouldn't prevent bind on top of another later on. To fix it right way we need to mark _dentry_ as unsuitable for mounting upon; new flag (DCACHE_CANT_MOUNT) is protected by d_flags and i_mutex on the inode in question. Set it (with dont_mount(dentry)) in unlink/rmdir/etc., check (with cant_mount(dentry)) in places in namespace.c that used to check for S_DEAD. Setting S_DEAD is still needed in places where we used to set it (for directories getting killed), since we rely on it for readdir/rmdir race prevention. 2) rename()/mount() protection has another bogosity - we unhash the target before we'd checked that it's not a mountpoint. Fixed. 3) ancient bogosity in pivot_root() - we locked i_mutex on the right directory, but checked S_DEAD on the different (and wrong) one. Noticed and fixed. Signed-off-by: Al Viro <[email protected]>
2010-05-15Merge branch 'perf' of ↵Ingo Molnar18-130/+322
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
2010-05-15x86, perf: P4 PMU - fix counters management logicCyrill Gorcunov1-4/+4
Jaswinder reported this #GP: | | Message from syslogd@ht at May 14 09:39:32 ... | kernel:[ 314.908612] EIP: [<c100ccca>] | x86_perf_event_set_period+0x19d/0x1b2 SS:ESP 0068:edac3d70 | Ming has narrowed it down to a comparision issue between arguments with different sizes and signs. As result event index reached a wrong value which in turn led to a GP fault. At the same time it was found that p4_next_cntr has broken logic and should return the counter index only if it was not yet borrowed for another event. Reported-by: Jaswinder Singh Rajput <[email protected]> Reported-by: Lin Ming <[email protected]> Bisected-by: Lin Ming <[email protected]> Tested-by: Jaswinder Singh Rajput <[email protected]> Signed-off-by: Cyrill Gorcunov <[email protected]> CC: Peter Zijlstra <[email protected]> CC: Frederic Weisbecker <[email protected]> LKML-Reference: <20100514190815.GG13509@lenovo> Signed-off-by: Ingo Molnar <[email protected]>
2010-05-14Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds12-35/+99
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6126/1: ARM mpcore_wdt: fix build failure and other fixes ARM: 6125/1: ARM TWD: move TWD registers to common header ARM: 6110/1: Fix Thumb-2 kernel builds when UACCESS_WITH_MEMCPY is enabled ARM: 6112/1: Use the Inner Shareable I-cache and BTB ops on ARMv7 SMP ARM: 6111/1: Implement read/write for ownership in the ARMv6 DMA cache ops ARM: 6106/1: Implement copy_to_user_page() for noMMU ARM: 6105/1: Fix the __arm_ioremap_caller() definition in nommu.c
2010-05-14Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, mrst: Don't blindly access extended config space
2010-05-14profile: fix stats and data leakageHugh Dickins1-1/+3
If the kernel is large or the profiling step small, /proc/profile leaks data and readprofile shows silly stats, until readprofile -r has reset the buffer: clear the prof_buffer when it is vmalloc()ed. Signed-off-by: Hugh Dickins <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2010-05-14hughd: update email addressHugh Dickins1-1/+1
My old address will shut down in a couple of weeks: update the tree. Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-05-14perf newt: Make <- zoom out filtersArnaldo Carvalho de Melo4-3/+120
After we use the filters to zoom into DSOs or threads, we can use <- (left arrow) to zoom out from the last filter applied. It is still possible to zoom out of order by using the popup menu. With this we now have the zoom out operation on the browsing fast path, by allowing fast navigation using just the four arrors and the enter key to expand collapse callchains. Suggested-by: Ingo Molnar <[email protected]> Cc: Frédéric Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tom Zanussi <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-05-14NFSD: don't report compiled-out versions as presentPavel Emelyanov1-1/+1
The /proc/fs/nfsd/versions file calls nfsd_vers() to check whether the particular nfsd version is present/available. The problem is that once I turn off e.g. NFSD-V4 this call returns -1 which is true from the callers POV which is wrong. The proposal is to report false in that case. The bug has existed since 6658d3a7bbfd1768 "[PATCH] knfsd: remove nfsd_versbits as intermediate storage for desired versions". Signed-off-by: Pavel Emelyanov <[email protected]> Cc: [email protected] Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2010-05-14x86, mrst: Don't blindly access extended config spaceH. Peter Anvin1-0/+4
Do not blindly access extended configuration space unless we actively know we're on a Moorestown platform. The fixed-size BAR capability lives in the extended configuration space, and thus is not applicable if the configuration space isn't appropriately sized. This fixes booting certain VMware configurations with CONFIG_MRST=y. Moorestown will add a fake PCI-X 266 capability to advertise the presence of extended configuration space. Reported-and-tested-by: Petr Vandrovec <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]> Acked-by: Jacob Pan <[email protected]> Acked-by: Jesse Barnes <[email protected]> LKML-Reference: <[email protected]>
2010-05-14Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds4-6/+18
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments x86, k8: Fix build error when K8_NB is disabled x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs x86: Fix fake apicid to node mapping for numa emulation
2010-05-14Merge branch 'master' of ↵Russell King6-6/+574
git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable
2010-05-14SUNRPC: Don't spam gssd with upcall requests when the kerberos key expiredTrond Myklebust3-12/+55
Now that the rpc.gssd daemon can explicitly tell us that the key expired, we should cache that information to avoid spamming gssd. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Reorder the struct rpc_task fieldsTrond Myklebust1-6/+6
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 <[email protected]>
2010-05-14SUNRPC: Remove the 'tk_magic' debugging fieldTrond Myklebust2-14/+0
It has not triggered in almost a decade. Time to get rid of it... Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Move the task->tk_bytes_sent and tk_rtt to struct rpc_rqstTrond Myklebust6-12/+12
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 <[email protected]>
2010-05-14NFS: Don't call iput() in nfs_access_cache_shrinkerTrond Myklebust1-15/+4
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 <[email protected]>
2010-05-14NFS: Clean up nfs_access_zap_cache()Trond Myklebust1-29/+31
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Don't run nfs_access_cache_shrinker() when the mask is GFP_NOFSTrond Myklebust1-0/+2
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 <[email protected]>
2010-05-14SUNRPC: Ensure rpcauth_prune_expired() respects the nr_to_scan parameterTrond Myklebust1-3/+2
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Ensure memory shrinker doesn't waste time in rpcauth_prune_expired()Trond Myklebust1-5/+7
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 <[email protected]>
2010-05-14SUNRPC: Dont run rpcauth_cache_shrinker() when gfp_mask is GFP_NOFSTrond Myklebust1-0/+2
Under some circumstances, put_rpccred() can end up allocating memory, so check the gfp_mask to prevent deadlocks. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Read requests can use GFP_KERNEL.Trond Myklebust1-2/+2
There is no danger of deadlock should the allocation trigger page writeback. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Clean up nfs_create_request()Trond Myklebust1-10/+4
There is no point in looping if we're out of memory. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Don't use GFP_KERNEL in rpcsec_gss downcallsTrond Myklebust8-30/+38
Again, we can deadlock if the memory reclaim triggers a writeback that requires a rpcsec_gss credential lookup. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFSv4: Don't use GFP_KERNEL allocations in state recoveryTrond Myklebust4-35/+39
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 <[email protected]>
2010-05-14SUNRPC: Fix xs_setup_bc_tcp()Trond Myklebust1-3/+0
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 <[email protected]>
2010-05-14SUNRPC: Replace jiffies-based metrics with ktime-based metricsChuck Lever6-28/+24
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14ktime: introduce ktime_to_ms()Chuck Lever1-2/+8
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: RPC metrics and RTT estimator should use same RTT valueChuck Lever3-11/+4
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Calldata for nfs4_renew_done()Chuck Lever1-6/+20
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Squelch compiler warning in nfs_add_server_stats()Chuck Lever1-3/+3
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Clean up fscache_uniq mount optionChuck Lever1-9/+9
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Squelch compiler warningChuck Lever1-1/+2
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Trivial cleanups in include/linux/sunrpc/xdr.hChuck Lever1-3/+5
Clean up: Update the documenting comment, and fix some minor white space issues. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFSv4: Clean up the NFSv4 setclientid operationTrond Myklebust6-24/+39
Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFSv4: Allow attribute caching with 'noac' mounts if client holds a delegationTrond Myklebust2-9/+18
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Fail over more quickly on connect errorsTrond Myklebust4-21/+2
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 <[email protected]>
2010-05-14SUNRPC: Move the test for XPRT_CONNECTING into xprt_connect()Trond Myklebust3-30/+19
This fixes a bug with setting xprt->stat.connect_start. Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Cleanup - make rpc_new_task() call rpc_release_calldata on failureTrond Myklebust2-18/+14
Also have it return an ERR_PTR(-ENOMEM) instead of a null pointer. Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14SUNRPC: Clean up xprt_release()Trond Myklebust1-16/+16
Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFSv4: Fix up the documentation for nfs_do_refmountTrond Myklebust1-1/+1
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Replace nfsroot on-stack filehandleTrond Myklebust1-6/+8
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Cleanup file handle allocations in fs/nfs/super.cTrond Myklebust1-4/+4
Use the new helper functions instead of open coding. Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Prevent the mount code from looping forever on broken exportsTrond Myklebust1-0/+73
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 <[email protected]>
2010-05-14NFS: Reduce stack footprint of nfs3_proc_getacl() and nfs3_proc_setacl()Trond Myklebust1-7/+16
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Reduce stack footprint of nfs_statfs()Trond Myklebust1-5/+9
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Reduce stack footprint of nfs_setattr()Trond Myklebust1-4/+10
Signed-off-by: Trond Myklebust <[email protected]>
2010-05-14NFS: Reduce stack footprint of nfs4_proc_create()Trond Myklebust1-10/+15
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 <[email protected]>
2010-05-14NFS: Reduce the stack footprint of nfs_proc_symlink()Trond Myklebust1-10/+16
Signed-off-by: Trond Myklebust <[email protected]>