aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-15NFSv4.1: fix break condition in pnfs_find_lsegBenny Halevy1-1/+1
The break condition to skip out of the loop got broken when cmp_layout was change. Essentially, we want to stop looking once we know no layout on the remainder of the list can match the first byte of the looked-up range. Reported-by: Peng Tao <[email protected]> Signed-off-by: Benny Halevy <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15nfs4.1: fix several problems with _pnfs_return_layoutFred Isaman2-7/+9
_pnfs_return_layout had the following problems: - it did not call pnfs_free_lseg_list on all paths - it unintentionally did a forgetful return when there was no outstanding io - it raced with concurrent LAYOUTGETS Signed-off-by: Fred Isaman <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NFSv4.1: allow zero fh array in filelayout decode layoutAndy Adamson1-5/+10
Signed-off-by: Andy Adamson <[email protected]> cc:[email protected] [2.6.39] Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NFSv4.1: allow nfs_fhget to succeed with mounted on fileidAndy Adamson3-11/+36
Commit 28331a46d88459788c8fca72dbb0415cd7f514c9 "Ensure we request the ordinary fileid when doing readdirplus" changed the meaning of NFS_ATTR_FATTR_FILEID which used to be set when FATTR4_WORD1_MOUNTED_ON_FILED was requested. Allow nfs_fhget to succeed with only a mounted on fileid when crossing a mountpoint or a referral. Ask for the fileid of the absent file system if mounted_on_fileid is not supported. Signed-off-by: Andy Adamson <[email protected]> cc:[email protected] [2.6.39] Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NFSv4.1: Fix a refcounting issue in the pNFS device id cacheTrond Myklebust1-0/+1
When we add something to the global device id cache, we need to bump the reference count, so that the cache itself holds a reference. Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NFSv4.1: deprecate headerpadsz in CREATE_SESSIONBenny Halevy3-9/+6
We don't support header padding yet so better off ditching it Reported-by: Sid Moore <[email protected]> Signed-off-by: Benny Halevy <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NFS41: do not update isize if inode needs layoutcommitPeng Tao1-1/+2
nfs_update_inode will update isize if there is no queued pages. For pNFS, layoutcommit is supposed to change file size on server, the same effect as queued pages. nfs_update_inode may be called when dirty pages are written back (nfsi->npages==0) but layoutcommit is not sent, and it will change client file size according to server file size. Then client ends up losing what it just writes back in pNFS path. So we should skip updating client file size if file needs layoutcommit. Signed-off-by: Peng Tao <[email protected]> Cc: [email protected] [2.6.39] Signed-off-by: Trond Myklebust <[email protected]>
2011-06-15NLM: Don't hang forever on NLM unlock requestsTrond Myklebust4-2/+13
If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasily Averin <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected]
2011-06-15NFS: fix umount of pnfs filesystemsWeston Andros Adamson2-5/+12
Unmounting a pnfs filesystem hangs using filelayout and possibly others. This fixes the use of the rcu protected node by making use of a new 'tmpnode' for the temporary purge list. Also, the spinlock shouldn't be held when calling synchronize_rcu(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Andy Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-06-01Merge git://git.infradead.org/mtd-2.6Linus Torvalds1-0/+1
* git://git.infradead.org/mtd-2.6: mtd: fix physmap.h warnings
2011-06-01mtd: fix physmap.h warningsRandy Dunlap1-0/+1
Fix build warnings in physmap.h: include/linux/mtd/physmap.h:25: warning: 'struct platform_device' declared inside parameter list include/linux/mtd/physmap.h:25: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/mtd/physmap.h:26: warning: 'struct platform_device' declared inside parameter list include/linux/mtd/physmap.h:27: warning: 'struct platform_device' declared inside parameter list Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2011-06-01Merge branch 'for-linus' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: AppArmor: fix oops in apparmor_setprocattr
2011-06-01kgdbts: only use new asm-generic/ptrace.h api when neededMike Frysinger1-1/+4
The new instruction_pointer_set helper is defined for people who have converted to asm-generic/ptrace.h, so don't use it generally unless the arch needs it (in which case it has been converted). This should fix building of kgdb tests for arches not yet converted. Signed-off-by: Mike Frysinger <[email protected]> Acked-by: Stephen Rothwell <[email protected]> Cc: Jason Wessel <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-06-01AppArmor: fix oops in apparmor_setprocattrKees Cook1-1/+2
When invalid parameters are passed to apparmor_setprocattr a NULL deref oops occurs when it tries to record an audit message. This is because it is passing NULL for the profile parameter for aa_audit. But aa_audit now requires that the profile passed is not NULL. Fix this by passing the current profile on the task that is trying to setprocattr. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: John Johansen <[email protected]> Cc: [email protected] Signed-off-by: James Morris <[email protected]>
2011-06-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linusLinus Torvalds23-113/+539
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio_net: delay TX callbacks virtio: add api for delayed callbacks virtio_test: support event index vhost: support event index virtio_ring: support event idx feature virtio ring: inline function to check for events virtio: event index interface virtio: add full three-clause BSD text to headers. virtio balloon: kill tell-host-first logic virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT. drivers, block: virtio_blk: Replace cryptic number with the macro virtio_blk: allow re-reading config space at runtime lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY. lguest: fix up compilation after move lguest: fix timer interrupt setup
2011-06-01Merge branch 'release' of ↵Linus Torvalds2-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] wire up sendmmsg() syscall for Itanium
2011-05-31[IA64] wire up sendmmsg() syscall for ItaniumTony Luck2-1/+3
Add entries in unistd.h and entry.S to make this new syscall visible. Signed-off-by: Tony Luck <[email protected]>
2011-06-01Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Fix mwait_play_dead() faulting on mwait-incapable cpus x86 idle: Fix mwait deprecation warning message Evil merge to remove extra quote noticed by Joe Perches
2011-06-01Merge branch 'core-urgent-for-linus' of ↵Linus Torvalds2-9/+56
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rcu: Cure load woes
2011-05-31Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Put back -pg to tsc.o and add no GCOV to vread_tsc_64.o
2011-05-31Merge branch 'for-linus' of ↵Linus Torvalds2-2/+3
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: autofs4: bogus dentry_unhash() added in ->unlink() vfs: shrink_dcache_parent before rmdir, dir rename
2011-05-31powerpc/pmac: Don't register pmac PIC syscore ops when HW not presentBenjamin Herrenschmidt1-1/+2
The Apple custom PIC only exist in some earlier machine models, anything with an MPIC will crash on suspend if we register those syscore ops unconditionally. This is a regression caused by commit f5a592f7d74e ("PM / PowerPC: Use struct syscore_ops instead of sysdevs for PM") Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-31rcu: Cure load woesPeter Zijlstra2-9/+56
Commit cc3ce5176d83 (rcu: Start RCU kthreads in TASK_INTERRUPTIBLE state) fudges a sleeping task' state, resulting in the scheduler seeing a TASK_UNINTERRUPTIBLE task going to sleep, but a TASK_INTERRUPTIBLE task waking up. The result is unbalanced load calculation. The problem that patch tried to address is that the RCU threads could stay in UNINTERRUPTIBLE state for quite a while and triggering the hung task detector due to on-demand wake-ups. Cure the problem differently by always giving the tasks at least one wake-up once the CPU is fully up and running, this will kick them out of the initial UNINTERRUPTIBLE state and into the regular INTERRUPTIBLE wait state. [ The alternative would be teaching kthread_create() to start threads as INTERRUPTIBLE but that needs a tad more thought. ] Reported-by: Damien Wyart <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Link: http://lkml.kernel.org/r/1306755291.1200.2872.camel@twins Signed-off-by: Ingo Molnar <[email protected]>
2011-05-30x86: Fix mwait_play_dead() faulting on mwait-incapable cpusAvi Kivity1-1/+1
A logic error in mwait_play_dead() causes the kernel to use mwait even on cpus which don't support it, such as KVM virtual cpus. Introduced by: 349c004e3d31: x86: A fast way to check capabilities of the current cpu Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=36222 Reported-by: Török Edwin <[email protected]> Signed-off-by: Avi Kivity <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Tejun Heo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-30x86 idle: Fix mwait deprecation warning messageBorislav Petkov1-1/+1
Fix: arch/x86/kernel/process.c:645:1: warning: unknown escape sequence '\i' due to missing escape backslash, introduced by this commit: 5d4c47e0195b: x86 idle: deprecate mwait_idle() and "idle=mwait" cmdline param Signed-off-by: Borislav Petkov <[email protected]> Cc: Len Brown <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-30autofs4: bogus dentry_unhash() added in ->unlink()Al Viro1-2/+0
Signed-off-by: Al Viro <[email protected]>
2011-05-30vfs: shrink_dcache_parent before rmdir, dir renameSage Weil1-0/+3
The dentry_unhash push-down series missed that shink_dcache_parent needs to be called prior to rmdir or dir rename to clear DCACHE_REFERENCED and allow efficient dentry reclaim. Reported-by: Dave Chinner <[email protected]> Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-05-30virtio_net: delay TX callbacksMichael S. Tsirkin1-1/+1
Ask for delayed callbacks on TX ring full, to give the other side more of a chance to make progress. Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio: add api for delayed callbacksMichael S. Tsirkin2-0/+36
Add an API that tells the other side that callbacks should be delayed until a lot of work has been done. Implement using the new event_idx feature. Note: it might seem advantageous to let the drivers ask for a callback after a specific capacity has been reached. However, as a single head can free many entries in the descriptor table, we don't really have a clue about capacity until get_buf is called. The API is the simplest to implement at the moment, we'll see what kind of hints drivers can pass when there's more than one user of the feature. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio_test: support event indexMichael S. Tsirkin1-2/+17
Add ability to test the new event idx feature, enable by default. Signed-off-by: Rusty Russell <[email protected]>
2011-05-30vhost: support event indexMichael S. Tsirkin4-50/+127
Support the new event index feature. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio_ring: support event idx featureMichael S. Tsirkin1-2/+24
Support for the new event idx feature: 1. When enabling interrupts, publish the current avail index value to the host to get interrupts on the next update. 2. Use the new avail_event feature to reduce the number of exits from the guest. Simple test with the simulator: [virtio]# time ./virtio_test spurious wakeus: 0x7 real 0m0.169s user 0m0.140s sys 0m0.019s [virtio]# time ./virtio_test --no-event-idx spurious wakeus: 0x11 real 0m0.649s user 0m0.295s sys 0m0.335s Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio ring: inline function to check for eventsMichael S. Tsirkin1-0/+14
With the new used_event and avail_event and features, both host and guest need similar logic to check whether events are enabled, so it helps to put the common code in the header. Note that Xen has similar logic for notification hold-off in include/xen/interface/io/ring.h with req_event and req_prod corresponding to event_idx + 1 and new_idx respectively. +1 comes from the fact that req_event and req_prod in Xen start at 1, while event index in virtio starts at 0. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio: event index interfaceMichael S. Tsirkin1-1/+14
Define a new feature bit for the guest and host to utilize an event index (like Xen) instead if a flag bit to enable/disable interrupts and kicks. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio: add full three-clause BSD text to headers.Rusty Russell9-7/+214
It's unclear to me if it's important, but it's obviously causing my technical colleages some headaches and I'd hate such imprecision to slow virtio adoption. I've emailed this to all non-trivial contributors for approval, too. Signed-off-by: Rusty Russell <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Ryan Harper <[email protected]> Acked-by: Anthony Liguori <[email protected]> Acked-by: Eric Van Hensbergen <[email protected]> Acked-by: john cooper <[email protected]> Acked-by: Aneesh Kumar K.V <[email protected]> Acked-by: Christian Borntraeger <[email protected]> Acked-by: Fernando Luis Vazquez Cao <[email protected]>
2011-05-30virtio balloon: kill tell-host-first logicDave Hansen1-13/+8
The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST feature bit. Whenever the bit is set, the guest kernel must always tell the host before we free pages back to the allocator. Without this feature, we might free a page (and have another user touch it) while the hypervisor is unprepared for it. But, if the bit is _not_ set, we are under no obligation to reverse the order; we're under no obligation to do _anything_. As of now, qemu-kvm defines the bit, but doesn't set it. This patch makes the "tell host first" logic the only case. This should make everybody happy, and reduce the amount of untested or untestable code in the kernel. This _also_ means that we don't have to preserve a pfn list after the pages are freed, which should let us get rid of some temporary storage (vb->pfns) eventually. Signed-off-by: Dave Hansen <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT.Rusty Russell1-5/+0
That's already been done by the virtio infrastructure before the probe function is called. Reported-by: [email protected] Acked-by: Amit Shah <[email protected]> Tested-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30drivers, block: virtio_blk: Replace cryptic number with the macroLiu Yuan1-1/+2
It is easier to figure out the context by reading SCSI_SENSE_BUFFERSIZE instead of plain '96'. Signed-off-by: Liu Yuan <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30virtio_blk: allow re-reading config space at runtimeChristoph Hellwig1-10/+78
Wire up the virtio_driver config_changed method to get notified about config changes raised by the host. For now we just re-read the device size to support online resizing of devices, but once we add more attributes that might be changeable they could be added as well. Note that the config_changed method is called from irq context, so we'll have to use the workqueue infrastructure to provide us a proper user context for our changes. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-05-30lguest: remove support for VIRTIO_F_NOTIFY_ON_EMPTY.Rusty Russell1-19/+1
No virtio device does this any more, so no need to clutter lguest with it. Signed-off-by: Rusty Russell <[email protected]>
2011-05-30lguest: fix up compilation after moveRusty Russell2-2/+2
ed16648eb5b86917f0b90bdcdbc857202da72f90 "Move kvm, uml, and lguest subdirectories" broke the lguest example launcher. Signed-off-by: Rusty Russell <[email protected]>
2011-05-30lguest: fix timer interrupt setupRusty Russell1-0/+1
Without an IRQ chip set, we now get a WARN_ON and no timer interrupt. This prevents booting. Fortunately, the fix is a one-liner: set up the timer IRQ like everything else. Signed-off-by: Rusty Russell <[email protected]> Cc: [email protected] # .39.x
2011-05-29Linux 3.0-rc1Linus Torvalds1-5/+5
.. except there are various scripts that really know that there are three numbers, so it calls itself "3.0.0-rc1". Hopefully by the time the final 3.0 is out, we'll have that extra zero all figured out. Signed-off-by: Linus Torvalds <[email protected]>
2011-05-29Merge branch 'for-linus' of ↵Linus Torvalds6-263/+220
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6: eCryptfs: Remove ecryptfs_header_cache_2 eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose() eCryptfs: Return useful code from contains_ecryptfs_marker eCryptfs: Fix new inode race condition eCryptfs: Cleanup inode initialization code eCryptfs: Consolidate inode functions into inode.c
2011-05-29Merge branch 'pnfs-submit' of git://git.open-osd.org/linux-open-osdLinus Torvalds32-279/+3907
* 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits) pnfs-obj: pg_test check for max_io_size NFSv4.1: define nfs_generic_pg_test NFSv4.1: use pnfs_generic_pg_test directly by layout driver NFSv4.1: change pg_test return type to bool NFSv4.1: unify pnfs_pageio_init functions pnfs-obj: objlayout_encode_layoutcommit implementation pnfs: encode_layoutcommit pnfs-obj: report errors and .encode_layoutreturn Implementation. pnfs: encode_layoutreturn pnfs: layoutret_on_setattr pnfs: layoutreturn pnfs-obj: osd raid engine read/write implementation pnfs: support for non-rpc layout drivers pnfs-obj: define per-inode private structure pnfs: alloc and free layout_hdr layoutdriver methods pnfs-obj: objio_osd device information retrieval and caching pnfs-obj: decode layout, alloc/free lseg pnfs-obj: pnfs_osd XDR client implementation pnfs-obj: pnfs_osd XDR definitions pnfs-obj: objlayoutdriver module skeleton ...
2011-05-29arm gpio drivers: make them 'depends on ARM'Linus Torvalds1-0/+4
We had a few drivers move from arch/arm into drivers/gpio, but they don't actually compile without the ARM platform headers etc. As a result they were messing up allyesconfig on x86. Make them depend on ARM. Reported-by: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-29eCryptfs: Remove ecryptfs_header_cache_2Tyler Hicks3-13/+6
Now that ecryptfs_lookup_interpose() is no longer using ecryptfs_header_cache_2 to read in metadata, the kmem_cache can be removed and the ecryptfs_header_cache_1 kmem_cache can be renamed to ecryptfs_header_cache. Signed-off-by: Tyler Hicks <[email protected]>
2011-05-29eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()Tyler Hicks3-105/+88
ecryptfs_lookup_interpose() has turned into spaghetti code over the years. This is an effort to clean it up. - Shorten overly descriptive variable names such as ecryptfs_dentry - Simplify gotos and error paths - Create helper function for reading plaintext i_size from metadata It also includes an optimization when reading i_size from the metadata. A complete page-sized kmem_cache_alloc() was being done to read in 16 bytes of metadata. The buffer for that is now statically declared. Signed-off-by: Tyler Hicks <[email protected]>
2011-05-29eCryptfs: Return useful code from contains_ecryptfs_markerTyler Hicks1-16/+10
Instead of having the calling functions translate the true/false return code to either 0 or -EINVAL, have contains_ecryptfs_marker() return 0 or -EINVAL so that the calling functions can just reuse the return code. Also, rename the function to ecryptfs_validate_marker() to avoid callers mistakenly thinking that it returns true/false codes. Signed-off-by: Tyler Hicks <[email protected]>
2011-05-29eCryptfs: Fix new inode race conditionTyler Hicks5-28/+30
Only unlock and d_add() new inodes after the plaintext inode size has been read from the lower filesystem. This fixes a race condition that was sometimes seen during a multi-job kernel build in an eCryptfs mount. https://bugzilla.kernel.org/show_bug.cgi?id=36002 Signed-off-by: Tyler Hicks <[email protected]> Reported-by: David <[email protected]> Tested-by: David <[email protected]>