aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-29ecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()Roberto Sassu1-6/+28
This patch allows keys requested in the function ecryptfs_keyring_auth_tok_for_sig()to be released when they are no longer required. In particular keys are directly released in the same function if the obtained authentication token is not valid. Further, a new function parameter 'auth_tok_key' has been added to ecryptfs_find_auth_tok_for_sig() in order to provide callers the key pointer to be passed to key_put(). Signed-off-by: Roberto Sassu <[email protected]> Cc: Dustin Kirkland <[email protected]> Cc: James Morris <[email protected]> [Tyler: Initialize auth_tok_key to NULL in ecryptfs_parse_packet_set] Signed-off-by: Tyler Hicks <[email protected]>
2010-10-29eCryptfs: Clear LOOKUP_OPEN flag when creating lower fileTyler Hicks1-0/+4
eCryptfs was passing the LOOKUP_OPEN flag through to the lower file system, even though ecryptfs_create() doesn't support the flag. A valid filp for the lower filesystem could be returned in the nameidata if the lower file system's create() function supported LOOKUP_OPEN, possibly resulting in unencrypted writes to the lower file. However, this is only a potential problem in filesystems (FUSE, NFS, CIFS, CEPH, 9p) that eCryptfs isn't known to support today. https://bugs.launchpad.net/ecryptfs/+bug/641703 Reported-by: Kevin Buhr Cc: stable <[email protected]> Signed-off-by: Tyler Hicks <[email protected]>
2010-10-29ecryptfs: call vfs_setxattr() in ecryptfs_setxattr()Roberto Sassu1-4/+3
Ecryptfs is a stackable filesystem which relies on lower filesystems the ability of setting/getting extended attributes. If there is a security module enabled on the system it updates the 'security' field of inodes according to the owned extended attribute set with the function vfs_setxattr(). When this function is performed on a ecryptfs filesystem the 'security' field is not updated for the lower filesystem since the call security_inode_post_setxattr() is missing for the lower inode. Further, the call security_inode_setxattr() is missing for the lower inode, leading to policy violations in the security module because specific checks for this hook are not performed (i. e. filesystem 'associate' permission on SELinux is not checked for the lower filesystem). This patch replaces the call of the setxattr() method of the lower inode in the function ecryptfs_setxattr() with vfs_setxattr(). Signed-off-by: Roberto Sassu <[email protected]> Cc: stable <[email protected]> Cc: Dustin Kirkland <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: Tyler Hicks <[email protected]>
2010-10-29Btrfs: fix raid code for removing missing drivesChris Mason1-2/+1
When btrfs is mounted in degraded mode, it has some internal structures to track the missing devices. This missing device is setup as readonly, but the mapping code can get upset when we try to write to it. This changes the mapping code to return -EIO instead of oops when we try to write to the readonly device. Signed-off-by: Chris Mason <[email protected]>
2010-10-29Btrfs: Switch the extent buffer rbtree into a radix treeMiao Xie2-69/+49
This patch reduces the CPU time spent in the extent buffer search by using the radix tree instead of the rbtree and using the rcu lock instead of the spin lock. I did a quick test by the benchmark tool[1] and found the patch improve the file creation/deletion performance problem that I have reported[2]. Before applying this patch: Create files: Total files: 50000 Total time: 0.971531 Average time: 0.000019 Delete files: Total files: 50000 Total time: 1.366761 Average time: 0.000027 After applying this patch: Create files: Total files: 50000 Total time: 0.927455 Average time: 0.000019 Delete files: Total files: 50000 Total time: 1.292280 Average time: 0.000026 [1] http://marc.info/?l=linux-btrfs&m=128212635122920&q=p3 [2] http://marc.info/?l=linux-btrfs&m=128212635122920&w=2 Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2010-10-29Btrfs: restructure try_release_extent_buffer()Miao Xie1-11/+37
restructure try_release_extent_buffer() and write a function to release the extent buffer. It will be used later. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2010-10-29Btrfs: use the flusher threads for delalloc throttlingChris Mason1-18/+15
We have a fairly complex set of loops around walking our list of delalloc inodes when we find metadata delalloc space running low. It doesn't work very well, can use large amounts of CPU and doesn't do very efficient writeback. This switches us to kick the bdi flusher threads instead. All dirty data in btrfs is accounted as delalloc data, so this is very similar in terms of what it writes, but we're able to just kick off the IO and wait for progress. Signed-off-by: Chris Mason <[email protected]>
2010-10-29Btrfs: tune the chunk allocation to 5% of the FS as metadataChris Mason1-4/+18
An earlier commit tried to keep us from allocating too many empty metadata chunks. It was somewhat too restrictive and could lead to ENOSPC errors on empty filesystems. This increases the limits to about 5% of the FS size, allowing more metadata chunks to be preallocated. Signed-off-by: Chris Mason <[email protected]>
2010-10-29Add new functions for triggering inode writebackChris Mason2-10/+44
When btrfs is running low on metadata space, it needs to force delayed allocation pages to disk. It currently does this with a suboptimal walk of a private list of inodes with delayed allocation, and it would be much better if we used the generic flusher threads. writeback_inodes_sb_if_idle would be ideal, but it waits for the flusher thread to start IO on all the dirty pages in the FS before it returns. This adds variants of writeback_inodes_sb* that allow the caller to control how many pages get sent down. Signed-off-by: Chris Mason <[email protected]>
2010-10-29Merge branch 'for-linus' of ↵Linus Torvalds102-759/+731
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: (29 commits) braino in internal.h convert simple cases of nfs-related ->get_sb() to ->mount() convert btrfs convert ceph convert gfs2 convert afs convert ecryptfs convert sysfs convert cgroup and cpuset switch get_sb_ns() users switch procfs to ->mount() setting ->proc_mnt doesn't belong in proc_get_sb() convert cifs convert nilfs switch logfs to ->mount() logfs: fix a leak in get_sb logfs get_sb, part 3 logfs get_sb, part 2 logfs get_sb massage, part 1 convert v9fs ...
2010-10-29Merge branch 'sched-fixes-for-linus' of ↵Linus Torvalds4-30/+25
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched_stat: Update sched_info_queue/dequeue() code comments sched, cgroup: Fixup broken cgroup movement
2010-10-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds8-44/+25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: kbuild: add ARCH=sparc32 target sparc32: fix build failure on CONFIG_SPARC_LEON sparc: Fixed random SPARC/LEON SMP CPU Stuck problem. sparc32: remove CONFIG_HAVE_PERF_EVENTS option sparc: don't #include asm/system.h in asm/jump_label.h sparc32: Fix unaligned stack handling on trap return. sparc: keep calling do_signal() as long as pending signals remain
2010-10-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6Linus Torvalds2-14/+11
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide: clean up timed out request handling hpt366: fix clock turnaround hpt366: add debounce delay to cable_detect() method
2010-10-29[S390] fix kprobes single steppingMartin Schwidefsky3-1/+10
Fix kprobes after git commit 1e54622e0403891b10f2105663e0f9dd595a1f17 broke it. The kprobe_handler is now called with interrupts in the state at the time of the breakpoint. The single step of the replaced instruction is done with interrupts off which makes it necessary to enable and disable the interupts in the kprobes code. Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] tape: fix dbf usageSebastian Ott2-7/+6
Get rid of the format string "%s" usage with volatile strings to prevent use after free errors in the s390dbf. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] dasd: provide a Sense Path Group ID ioctlStefan Weinhuber3-18/+92
The BIODASDSNID ioctl executes a 'Sense Path Group ID' command on a DASD ECKD device. The returned path group data allows user space programs to determine path state and path group ID of the channel paths to the device. Signed-off-by: Stefan Weinhuber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] ftrace: select HAVE_C_RECORDMCOUNTHeiko Carstens1-0/+1
Select HAVE_C_RECORDMCOUNT for the fast C version of recordmcount. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] vdso: get rid of redefinition warningsHeiko Carstens5-13/+13
The CLOCK_* defines in asm-offsets.c are only used for the vdso code however in the meantime they cause other trouble. Just rename them to get permanently rid of this: In file included from /home2/heicarst/linux-2.6/arch/s390/include/asm/asm-offsets.h:1:0, from arch/s390/mm/fault.c:33: include/generated/asm-offsets.h:53:0: warning: "CLOCK_REALTIME" redefined include/linux/time.h:286:0: note: this is the location of the previous definition include/generated/asm-offsets.h:54:0: warning: "CLOCK_MONOTONIC" redefined include/linux/time.h:287:0: note: this is the location of the previous definition Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] facility detection: remove unused variableHeiko Carstens1-2/+0
arch/s390/kernel/early.c: In function 'setup_hpage': arch/s390/kernel/early.c:285:15: warning: unused variable 'facilities' Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] hypfs: Fix error handling in hypfs_diag initializationMichael Holzheu1-8/+11
Fix the following two error handling bugs in hypfs_diag_init(): * No need for calling diag204_free_buffer() * Initialize name table only in case of LPAR and prevent error message on non-LPAR systems. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] topology: fix cpu masks for topology=off caseHeiko Carstens1-2/+4
Fix cpu masks for 'topology=off' case. Folding of the scheduling domains happen in such a way that everything belongs to the MC domain instead of the CPU doimain. This should fix a performance regression introduced with eafd2b6d "[S390] topology: use default MC domain initializer" and also makes sure we have the same behavious as if CONFIG_SCHED_MC was not selected at all. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] topology: add SCHED_MC config optionHeiko Carstens2-1/+12
This allows us to easily check for performance differences seen with !CONFIG_SCHED_MC and topology=off. Actually there shouldn't be any (besides a small overhead because of additional code). Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] Kconfig: add machine type number to code generation optionsHeiko Carstens1-26/+23
Add machine type number to code generation options. Also clean up and shorten quite a lot of help texts with respect to machine type and architecture terminology. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29[S390] Add z196 machine type to setup_hwcapsHeiko Carstens1-0/+3
Add machine type for zEnterprise 196 to elf platform detection. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-10-29Btrfs: don't loop forever on bad btree blocksChris Mason1-9/+28
When btrfs discovers the generation number in a btree block is incorrect, it can loop forever without forcing the RAID code to try a valid mirror, and without returning EIO. This changes things to properly kick out the EIO. Signed-off-by: Chris Mason <[email protected]>
2010-10-29PM / Runtime: Fix typo in status comparison causing warningKevin Winchester1-1/+1
GCC version 4.5.1 gives the following warning: drivers/base/power/runtime.c: In function ‘rpm_check_suspend_allowed’: drivers/base/power/runtime.c:146:25: warning: comparison between ‘enum dpm_state’ and ‘enum rpm_status’ which seems to be a typo in that dev->power.runtime_status should be compared instead of dev->power.status. Signed-off-by: Kevin Winchester <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2010-10-29Merge branch 'bug-fixes' of ↵Chris Mason7-179/+294
git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work Conflicts: fs/btrfs/extent-tree.c Signed-off-by: Chris Mason <[email protected]>
2010-10-29Btrfs: let the user know space caching is enabledJosef Bacik1-0/+2
If you mount -o space_cache, the option will be persistent across mounts, but to make sure the user knows that they did this, emit a message telling them if they didn't mount with -o space_cache but the feature is still used. Signed-off-by: Josef Bacik <[email protected]>
2010-10-29Btrfs: Add a clear_cache mount optionJosef Bacik4-3/+8
If something goes wrong with the free space cache we need a way to make sure it's not loaded on mount and that it's cleared for everybody. When you pass the clear_cache option it will make it so all block groups are setup to be cleared, which keeps them from being loaded and then they will be truncated when the transaction is committed. Thanks, Signed-off-by: Josef Bacik <[email protected]>
2010-10-29Btrfs: add support for mixed data+metadata block groupsJosef Bacik2-4/+28
There are just a few things that need to be fixed in the kernel to support mixed data+metadata block groups. Mostly we just need to make sure that if we are using mixed block groups that we continue to allocate mixed block groups as we need them. Also we need to make sure __find_space_info will find our space info if we search for DATA or METADATA only. Tested this with xfstests and it works nicely. Thanks, Signed-off-by: Josef Bacik <[email protected]>
2010-10-29Btrfs: check cache->caching_ctl before returning if caching has startedJosef Bacik1-0/+6
With the free space disk caching we can mark the block group as started with the caching, but we don't have a caching ctl. This can race with anybody else who tries to get the caching ctl before we cache (this is very hard to do btw). So instead check to see if cache->caching_ctl is set, and if not return NULL. Thanks, Signed-off-by: Josef Bacik <[email protected]>
2010-10-29Btrfs: load free space cache if it existsJosef Bacik3-3/+345
This patch actually loads the free space cache if it exists. The only thing that really changes here is that we need to cache the block group if we're going to remove an extent from it. Previously we did not do this since the caching kthread would pick it up. With the on disk cache we don't have this luxury so we need to make sure we read the on disk cache in first, and then remove the extent, that way when the extent is unpinned the free space is added to the block group. This has been tested with all sorts of things. Signed-off-by: Josef Bacik <[email protected]>
2010-10-29Btrfs: write out free space cacheJosef Bacik6-13/+420
This is a simple bit, just dump the free space cache out to our preallocated inode when we're writing out dirty block groups. There are a bunch of changes in inode.c in order to account for special cases. Mostly when we're doing the writeout we're holding trans_mutex, so we need to use the nolock transacation functions. Also we can't do asynchronous completions since the async thread could be blocked on already completed IO waiting for the transaction lock. This has been tested with xfstests and btrfs filesystem balance, as well as my ENOSPC tests. Thanks, Signed-off-by: Josef Bacik <[email protected]>
2010-10-29oprofile: Remove deprecated use of flush_scheduled_work()Tejun Heo3-4/+9
flush_scheduled_work() is deprecated and scheduled to be removed. sync_stop() currently cancels cpu_buffer works inside buffer_mutex and flushes the system workqueue outside. Instead, split end_cpu_work() into two parts - stopping further work enqueues and flushing works - and do the former inside buffer_mutex and latter outside. For stable kernels v2.6.35.y and v2.6.36.y. Signed-off-by: Tejun Heo <[email protected]> Cc: [email protected] Signed-off-by: Robert Richter <[email protected]>
2010-10-29oprofile: Fix the hang while taking the cpu offlineSantosh Shilimkar1-0/+13
The kernel build with CONFIG_OPROFILE and CPU_HOTPLUG enabled. The oprofile is initialised using system timer in absence of hardware counters supports. Oprofile isn't started from userland. In this setup while doing a CPU offline the kernel hangs in infinite for loop inside lock_hrtimer_base() function This happens because as part of oprofile_cpu_notify(, it tries to stop an hrtimer which was never started. These per-cpu hrtimers are started when the oprfile is started. echo 1 > /dev/oprofile/enable This problem also existwhen the cpu is booted with maxcpus parameter set. When bringing the remaining cpus online the timers are started even if oprofile is not yet enabled. This patch fix this issue by adding a state variable so that these hrtimer start/stop is only attempted when oprofile is started For stable kernels v2.6.35.y and v2.6.36.y. Reported-by: Jan Sebastien <[email protected]> Tested-by: sricharan <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Cc: [email protected] Signed-off-by: Robert Richter <[email protected]>
2010-10-29braino in internal.hAl Viro1-1/+1
wrong return type... Signed-off-by: Al Viro <[email protected]>
2010-10-29convert simple cases of nfs-related ->get_sb() to ->mount()Al Viro1-50/+46
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert btrfsAl Viro1-9/+6
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert cephAl Viro1-23/+27
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert gfs2Al Viro1-29/+22
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert afsAl Viro1-12/+7
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert ecryptfsAl Viro1-7/+5
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert sysfsAl Viro1-19/+13
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert cgroup and cpusetAl Viro2-13/+11
Signed-off-by: Al Viro <[email protected]>
2010-10-29switch get_sb_ns() usersAl Viro3-15/+12
Signed-off-by: Al Viro <[email protected]>
2010-10-29switch procfs to ->mount()Al Viro1-7/+6
Signed-off-by: Al Viro <[email protected]>
2010-10-29setting ->proc_mnt doesn't belong in proc_get_sb()Al Viro1-1/+2
take that to kern_mount_data()-using callers Signed-off-by: Al Viro <[email protected]>
2010-10-29convert cifsAl Viro1-8/+7
Signed-off-by: Al Viro <[email protected]>
2010-10-29convert nilfsAl Viro1-9/+7
Signed-off-by: Al Viro <[email protected]>
2010-10-29switch logfs to ->mount()Al Viro2-27/+23
Signed-off-by: Al Viro <[email protected]>