aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-02dm flakey: add corrupt_bio_byte featureMike Snitzer2-15/+159
Add corrupt_bio_byte feature to simulate corruption by overwriting a byte at a specified position with a specified value during intervals when the device is "down". Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm flakey: add drop_writesMike Snitzer2-14/+78
Add 'drop_writes' option to drop writes silently while the device is 'down'. Reads are not touched. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm flakey: support feature argsMike Snitzer1-19/+64
Add the ability to specify arbitrary feature flags when creating a flakey target. This code uses the same target argument helpers that the multipath target does. Also remove the superfluous 'dm-flakey' prefixes from the error messages, as they already contain the prefix 'flakey'. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm flakey: use dm_target_offset and support discardsMike Snitzer1-1/+2
Use dm_target_offset() and support discards. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm table: share target argument parsing functionsMike Snitzer4-112/+147
Move multipath target argument parsing code into dm-table so other targets can share it. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm snapshot: skip reading origin when overwriting complete chunkMikulas Patocka3-3/+103
If we write a full chunk in the snapshot, skip reading the origin device because the whole chunk will be overwritten anyway. This patch changes the snapshot write logic when a full chunk is written. In this case: 1. allocate the exception 2. dispatch the bio (but don't report the bio completion to device mapper) 3. write the exception record 4. report bio completed Callbacks must be done through the kcopyd thread, because callbacks must not race with each other. So we create two new functions: dm_kcopyd_prepare_callback: allocate a job structure and prepare the callback. (This function must not be called from interrupt context.) dm_kcopyd_do_callback: submit callback. (This function may be called from interrupt context.) Performance test (on snapshots with 4k chunk size): without the patch: non-direct-io sequential write (dd): 17.7MB/s direct-io sequential write (dd): 20.9MB/s non-direct-io random write (mkfs.ext2): 0.44s with the patch: non-direct-io sequential write (dd): 26.5MB/s direct-io sequential write (dd): 33.2MB/s non-direct-io random write (mkfs.ext2): 0.27s Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm: ignore merge_bvec for snapshots when safeMikulas Patocka3-2/+64
Add a new flag DMF_MERGE_IS_OPTIONAL to struct mapped_device to indicate whether the device can accept bios larger than the size its merge function returns. When set, use this to send large bios to snapshots which can split them if necessary. Snapshot I/O may be significantly fragmented and this approach seems to improve peformance. Before the patch, dm_set_device_limits restricted bio size to page size if the underlying device had a merge function and the target didn't provide a merge function. After the patch, dm_set_device_limits restricts bio size to page size if the underlying device has a merge function, doesn't have DMF_MERGE_IS_OPTIONAL flag and the target doesn't provide a merge function. The snapshot target can't provide a merge function because when the merge function is called, it is impossible to determine where the bio will be remapped. Previously this led us to impose a 4k limit, which we can now remove if the snapshot store is located on a device without a merge function. Together with another patch for optimizing full chunk writes, it improves performance from 29MB/s to 40MB/s when writing to the filesystem on snapshot store. If the snapshot store is placed on a non-dm device with a merge function (such as md-raid), device mapper still limits all bios to page size. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm table: clean dm_get_device and move exportsMike Snitzer1-20/+13
There is no need for __table_get_device to be factored out. Also move the exports to the end of their respective functions. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: tidy includesAlasdair G Kergon1-1/+2
A dm target only needs to use include/linux dm headers. Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm ioctl: prevent empty messageAlasdair G Kergon1-0/+5
Detect invalid empty messages in core dm instead of requiring every target to check this. Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: cleanup parameter handlingJonathan Brassow1-19/+23
Re-order the parameters so they are handled consistently in the same order where defined, parsed and output. Only include rebuild parameters in the STATUSTYPE_TABLE output if they were supplied in the original table line. Correct the parameter count when outputting rebuild: there are two words, not one. Use case-independent checks for keywords (as in other device-mapper targets). Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm snapshot: style cleanupsJonathan Brassow2-10/+8
Coding style cleanups. Signed-off-by: Alasdair G Kergon <[email protected]> Signed-off-by: Jonathan Brassow <[email protected]>
2011-08-02dm snapshot: remove unused definitionsMikulas Patocka1-10/+0
Remove a couple of unused #defines. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm kcopyd: remove nr_pages field from job structureMikulas Patocka1-4/+2
The nr_pages field in struct kcopyd_job is only used temporarily in run_pages_job() to count the number of required pages. We can use a local variable instead. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm kcopyd: remove offset field from job structureMikulas Patocka1-5/+2
The offset field in struct kcopyd_job is always zero so remove it. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm: use vzallocJoe Perches3-7/+3
Use vzalloc() instead of vmalloc()+memset(). Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm log: userspace use list_moveKirill A. Shutemov1-2/+1
Replace list_del() followed by list_add() with list_move(). Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm log: clean up bit little endian bitopsAkinobu Mita1-5/+4
Using __test_and_{set,clear}_bit_le() with ignoring its return value can be replaced with __{set,clear}_bit_le(). This also removes unnecessary casts. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm table: fix discard supportMike Snitzer2-9/+9
Remove 'discards_supported' from the dm_table structure. The same information can be easily discovered from the table's target(s) in dm_table_supports_discards(). Before this fix dm_table_supports_discards() would skip checking the individual targets' 'discards_supported' flag if any one target in the table didn't set num_discard_requests > 0. Now the per-target 'discards_supported' flag is effective at insuring the final DM device advertises discard support. But, to be clear, targets that don't support discards (!num_discard_requests) will not receive discard requests. Also DMWARN if a target sets 'discards_supported' override but forgets to set 'num_discard_requests'. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm: suppress endian warningsAlasdair G Kergon3-43/+54
Suppress sparse warnings about cpu_to_le32() by using __le32 types for on-disk data etc. Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm: fix idr leak on module removalAlasdair G Kergon1-2/+8
Destroy _minor_idr when unloading the core dm module. (Found by kmemleak.) Cc: [email protected] Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm io: flush cpu cache with vmapped ioMikulas Patocka1-2/+27
For normal kernel pages, CPU cache is synchronized by the dma layer. However, this is not done for pages allocated with vmalloc. If we do I/O to/from vmallocated pages, we must synchronize CPU cache explicitly. Prior to doing I/O on vmallocated page we must call flush_kernel_vmap_range to flush dirty cache on the virtual address. After finished read we must call invalidate_kernel_vmap_range to invalidate cache on the virtual address, so that accesses to the virtual address return newly read data and not stale data from CPU cache. This patch fixes metadata corruption on dm-snapshots on PA-RISC and possibly other architectures with caches indexed by virtual address. Cc: stable <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm mpath: fix potential NULL pointer in feature arg processingMike Snitzer1-0/+5
Avoid dereferencing a NULL pointer if the number of feature arguments supplied is fewer than indicated. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> Cc: [email protected]
2011-08-02dm snapshot: flush disk cache when mergingMikulas Patocka1-1/+1
This patch makes dm-snapshot flush disk cache when writing metadata for merging snapshot. Without cache flushing the disk may reorder metadata write and other data writes and there is a possibility of data corruption in case of power fault. Cc: [email protected] Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02watchdog: Cleanup WATCHDOG_CORE help textJosh Boyer1-3/+0
The newly added WATCHDOG_CORE option is a bool, but the help text suggests it can be built as a module. Fix it up. Signed-off-by: Josh Boyer <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2011-08-02watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boardsMart Gerrits1-0/+8
At present the module does not unset the NO_REBOOT bit upon shutdown, this causes the BIOS to fail the POST once and reset. During the next boot it displays the following error message: ***** Warning: System BOOT Fail ***** Your system last boot fail or POST interrupted. Please enter setup to load default and reboot again. Press F1 to continue, DEL to enter SETUP With this patch the NO_REBOOT flag will be unset on shutdown and thus stop this failure from occurring. Tested on 'ASUS P5N32-E SLI with BIOS revision 1801' and 'ASUS P5N32-E SLI PLUS with BIOS revision 1502'. Signed-off-by: Mart Gerrits <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2011-08-02watchdog: shwdt: fix usage of mod_timerDavid Engraf1-1/+1
Fix the usage of mod_timer() and make the driver usable. mod_timer() must be called with an absolute timeout in jiffies. The old implementation used a relative timeout thus the hardware watchdog was never triggered. Signed-off-by: David Engraf <[email protected]> Signed-off-by: Paul Mundt <[email protected]> Signed-off-by: Wim Van sebroeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: stable <[email protected]>
2011-08-02Merge branch 'fix/asoc' into for-linusTakashi Iwai1-0/+1
2011-08-02ALSA: asihpi - Clarify adapter index validity checkEliot Blennerhassett1-7/+12
Avoids assigning possibly invalid address to pa, even if it is never dereferenced. Correct error response to reflect request object/function ids. Signed-off-by: Eliot Blennerhassett <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-08-02ACPI print OSI(Linux) warning only onceLen Brown1-1/+1
This message gets repeated on some machines: https://bugzilla.kernel.org/show_bug.cgi?id=29292 Signed-off-by: Len Brown <[email protected]>
2011-08-01oom: task->mm == NULL doesn't mean the memory was freedOleg Nesterov1-1/+3
exit_mm() sets ->mm == NULL then it does mmput()->exit_mmap() which frees the memory. However select_bad_process() checks ->mm != NULL before TIF_MEMDIE, so it continues to kill other tasks even if we have the oom-killed task freeing its memory. Change select_bad_process() to check ->mm after TIF_MEMDIE, but skip the tasks which have already passed exit_notify() to ensure a zombie with TIF_MEMDIE set can't block oom-killer. Alternatively we could probably clear TIF_MEMDIE after exit_mmap(). Signed-off-by: Oleg Nesterov <[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-08-01Merge branch 'for-linus' of ↵Linus Torvalds9-202/+311
git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (23 commits) regulator: Improve WM831x DVS VSEL selection algorithm regulator: Bootstrap wm831x DVS VSEL value from ON VSEL if not already set regulator: Set up GPIO for WM831x VSEL before enabling VSEL mode regulator: Add EPEs to the MODULE_ALIAS() for wm831x-dcdc regulator: Fix WM831x DCDC DVS VSEL bootstrapping regulator: Fix WM831x regulator ID lookups for multiple WM831xs regulator: Fix argument format type errors in error prints regulator: Fix memory leak in set_machine_constraints() error paths regulator: Make core more chatty about some errors regulator: tps65910: Fix array access out of bounds bug regulator: tps65910: Add missing breaks in switch/case regulator: tps65910: Fix a memory leak in tps65910_probe error path regulator: TWL: Remove entry of RES_ID for 6030 macros ASoC: tlv320aic3x: Add correct hw registers to Line1 cross connect muxes regulator: Add basic per consumer debugfs regulator: Add rdev_crit() macro regulator: Refactor supply implementation to work as regular consumers regulator: Include the device name in the microamps_requested_ file regulator: Increase the limit on sysfs file names regulator: Properly register dummy regulator driver ...
2011-08-01Merge branch 'for_linus' of ↵Linus Torvalds22-1972/+2190
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (60 commits) ext4: prevent memory leaks from ext4_mb_init_backend() on error path ext4: use EXT4_BAD_INO for buddy cache to avoid colliding with valid inode # ext4: use ext4_msg() instead of printk in mballoc ext4: use ext4_kvzalloc()/ext4_kvmalloc() for s_group_desc and s_group_info ext4: introduce ext4_kvmalloc(), ext4_kzalloc(), and ext4_kvfree() ext4: use the correct error exit path in ext4_init_inode_table() ext4: add missing kfree() on error return path in add_new_gdb() ext4: change umode_t in tracepoint headers to be an explicit __u16 ext4: fix races in ext4_sync_parent() ext4: Fix overflow caused by missing cast in ext4_fallocate() ext4: add action of moving index in ext4_ext_rm_idx for Punch Hole ext4: simplify parameters of reserve_backup_gdb() ext4: simplify parameters of add_new_gdb() ext4: remove lock_buffer in bclean() and setup_new_group_blocks() ext4: simplify journal handling in setup_new_group_blocks() ext4: let setup_new_group_blocks() set multiple bits at a time ext4: fix a typo in ext4_group_extend() ext4: let ext4_group_add_blocks() handle 0 blocks quickly ext4: let ext4_group_add_blocks() return an error code ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks() ... Fix up conflict in fs/ext4/inode.c: commit aacfc19c626e ("fs: simplify the blockdev_direct_IO prototype") had changed the ext4_ind_direct_IO() function for the new simplified calling convention, while commit dae1e52cb126 ("ext4: move ext4_ind_* functions from inode.c to indirect.c") moved the function to another file.
2011-08-01Merge branch 'for-linus' of ↵Linus Torvalds31-150/+161
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: xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set VFS: Reorganise shrink_dcache_for_umount_subtree() after demise of dcache_lock VFS: Remove dentry->d_lock locking from shrink_dcache_for_umount_subtree() VFS: Remove detached-dentry counter from shrink_dcache_for_umount_subtree() switch posix_acl_chmod() to umode_t switch posix_acl_from_mode() to umode_t switch posix_acl_equiv_mode() to umode_t * switch posix_acl_create() to umode_t * block: initialise bd_super in bdget() vfs: avoid call to inode_lru_list_del() if possible vfs: avoid taking inode_hash_lock on pipes and sockets vfs: conditionally call inode_wb_list_del() VFS: Fix automount for negative autofs dentries Btrfs: load the key from the dir item in readdir into a fake dentry devtmpfs: missing initialialization in never-hit case hppfs: missing include
2011-08-01Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds17-399/+612
* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (37 commits) Improve slave/cyclic DMA engine documentation dmaengine: pl08x: handle the rest of enums in pl08x_width DMA: PL08x: cleanup selection of burst size DMA: PL08x: avoid recalculating cctl at each prepare DMA: PL08x: cleanup selection of buswidth DMA: PL08x: constify plchan->cd and plat->slave_channels DMA: PL08x: separately store source/destination cctl DMA: PL08x: separately store source/destination slave address DMA: PL08x: clean up LLI debugging DMA: PL08x: select LLI bus only once per LLI setup DMA: PL08x: remove unused constants ARM: mxs-dma: reset after disable channel dma: intel_mid_dma: remove redundant pci_set_drvdata calls dma: mxs-dma: fix unterminated platform_device_id table dmaengine: pl330: make platform data optional dmaengine: imx-sdma: return proper error if kzalloc fails pch_dma: Fix CTL register access issue dmaengine: mxs-dma: skip request_irq for NO_IRQ dmaengine/coh901318: fix slave submission semantics dmaengine/ste_dma40: allow memory buswidth/burst to be configured ... Fix trivial whitespace conflict in drivers/dma/mv_xor.c
2011-08-01Merge branch 'gpiolib' of ↵Linus Torvalds2-0/+59
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'gpiolib' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Hook up gpiolib support
2011-08-01Merge branch 'pstore-efi' of ↵Linus Torvalds9-34/+296
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: efivars: Introduce PSTORE_EFI_ATTRIBUTES efivars: Use string functions in pstore_write efivars: introduce utf16_strncmp efivars: String functions efi: Add support for using efivars as a pstore backend pstore: Allow the user to explicitly choose a backend pstore: Make "part" unsigned pstore: Add extra context for writes and erases pstore: Extend API for more flexibility in new backends
2011-08-01Merge branch 'for_linus' of ↵Linus Torvalds7-42/+53
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: kdb,kgdb: Allow arbitrary kgdb magic knock sequences kdb: Remove all references to DOING_KGDB2 kdb,kgdb: Implement switch and pass buffer from kdb -> gdb kdb: cleanup unused variables missed in the original kdb merge
2011-08-01ext4: prevent memory leaks from ext4_mb_init_backend() on error pathYu Jian1-6/+6
In ext4_mb_init(), if the s_locality_group allocation fails it will currently cause the allocations made in ext4_mb_init_backend() to be leaked. Moving the ext4_mb_init_backend() allocation after the s_locality_group allocation avoids that problem. Signed-off-by: Yu Jian <[email protected]> Signed-off-by: Andreas Dilger <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-08-01ext4: use EXT4_BAD_INO for buddy cache to avoid colliding with valid inode #Yu Jian1-1/+5
Signed-off-by: Yu Jian <[email protected]> Signed-off-by: Andreas Dilger <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-08-01ext4: use ext4_msg() instead of printk in mballocTheodore Ts'o1-37/+42
Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-08-01Btrfs: don't call writepages from within write_full_pageJosef Bacik1-10/+0
When doing a writepage we call writepages to try and write out any other dirty pages in the area. This could cause problems where we commit a transaction and then have somebody else dirtying metadata in the area as we could end up writing out a lot more than we care about, which could cause latency on anybody who is waiting for the transaction to completely finish committing. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: Remove unused variable 'last_index' in file.cMitch Harder1-5/+2
The variable 'last_index' is calculated in the __btrfs_buffered_write function and passed as a parameter to the prepare_pages function, but is not used anywhere in the prepare_pages function. Remove instances of 'last_index' in these functions. Signed-off-by: Mitch Harder <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up for find_first_extent_bit()Xiao Guangrong1-40/+24
find_first_extent_bit() and find_first_extent_bit_state() share most of the code, and we can just make the former call the latter. Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up for wait_extent_bit()Xiao Guangrong1-5/+1
We can just use cond_resched_lock(). Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up for insert_state()Xiao Guangrong1-5/+5
Don't duplicate set_state_bits(). Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: remove unused members from struct extent_stateXiao Guangrong1-2/+0
These members are not used at all. Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up code for merging extent mapsLi Zefan1-38/+21
unpin_extent_cache() and add_extent_mapping() shares the same code that merges extent maps. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up code for extent_map lookupLi Zefan1-56/+29
lookup_extent_map() and search_extent_map() can share most of code. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-08-01Btrfs: clean up search_extent_mapping()Li Zefan1-14/+3
rb_node returned by __tree_search() can be a valid pointer or NULL, but won't be some errno. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>