aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-02dm crypt: optionally support discard requestsMilan Broz2-5/+65
Add optional parameter field to dmcrypt table and support "allow_discards" option. Discard requests bypass crypt queue processing. Bio is simple remapped to underlying device. Note that discard will be never enabled by default because of security consequences. It is up to the administrator to enable it for encrypted devices. (Note that userspace cryptsetup does not understand new optional parameters yet. Support for this will come later. Until then, you should use 'dmsetup' to enable and disable this.) Signed-off-by: Milan Broz <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: add md raid1 supportJonathan Brassow1-10/+39
Support the MD RAID1 personality through dm-raid. Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: support metadata devicesJonathan Brassow3-24/+412
Add the ability to parse and use metadata devices to dm-raid. Although not strictly required, without the metadata devices, many features of RAID are unavailable. They are used to store a superblock and bitmap. The role, or position in the array, of each device must be recorded in its superblock. This is to help with fault handling, array reshaping, and sanity checks. RAID 4/5/6 devices must be loaded in a specific order: in this way, the 'array_position' field helps validate the correctness of the mapping when it is loaded. It can be used during reshaping to identify which devices are added/removed. Fault handling is impossible without this field. For example, when a device fails it is recorded in the superblock. If this is a RAID1 device and the offending device is removed from the array, there must be a way during subsequent array assembly to determine that the failed device was the one removed. This is done by correlating the 'array_position' field and the bit-field variable 'failed_devices'. Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: add write_mostly parameterJonathan Brassow2-2/+28
Add the write_mostly parameter to RAID1 dm-raid tables. This allows the user to set the WriteMostly flag on a RAID1 device that should normally be avoided for read I/O. Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: add region_size parameterJonathan Brassow2-3/+83
Allow the user to specify the region_size. Ensures that the supplied value meets md's constraints, viz. the number of regions does not exceed 2^21. Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm raid: improve table parameters documentationJonathan Brassow1-46/+78
Add more information about some dm-raid table parameters and clarify how parameters are printed when 'dmsetup table' is issued. Signed-off-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm ioctl: forbid multiple device specifiersMikulas Patocka1-0/+6
Exactly one of name, uuid or device must be specified when referencing an existing device. This removes the ambiguity (risking the wrong device being updated) if two conflicting parameters were specified. Previously one parameter got used and any others were ignored silently. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm ioctl: introduce __get_dev_cellMikulas Patocka1-17/+24
Move logic to find device based on major/minor number to a separate function __get_dev_cell (similar to __get_uuid_cell and __get_name_cell). This makes the function __find_device_hash_cell more straightforward. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2011-08-02dm ioctl: fill in device parameters in more ioctlsMikulas Patocka2-29/+38
Move parameter filling from find_device to __find_device_hash_cell. This patch causes ioctls using __find_device_hash_cell (DM_DEV_REMOVE_CMD, DM_DEV_SUSPEND_CMD - resume, DM_TABLE_CLEAR_CMD) to return device parameters, bringing them into line with the other ioctls. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
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-02bnx2x: Prevent restarting Tx during bnx2x_nic_unloadVladislav Zolotarov1-2/+8
Tx queues were stopped before bp->state was changed to a value different from BNX2X_STATE_OPEN, which allowed the bnx2x_tx_int() called from the NAPI context to re-enable it. This then allowed the netdev->ndo_start_xmit() to be called in the middle of the function reset and rings freeing. This patch changes bp->state to a value different from BNX2X_STATE_OPEN BEFORE disabling the Tx queues in order to restore the broken protection against the above race in the bnx2x_tx_int(). Signed-off-by: Vladislav Zolotarov <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[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-01fix block device fallout from ->fsync() changesRafael J. Wysocki1-0/+4
blkdev_fsync() needs to write pages in pagecache... Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Al Viro <[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-01net: add kerneldoc to skb_copy_bits()Eric Dumazet1-2/+15
Since skb_copy_bits() is called from assembly, add a fat comment to make clear we should think twice before changing its prototype. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-01Documentation/bonding.txt: Update to 3.x version numbersJesper Juhl1-1/+1
Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-01doc: Update the email address for Paul Moore in various source filesPaul Moore32-33/+31
My @hp.com will no longer be valid starting August 5, 2011 so an update is necessary. My new email address is employer independent so we don't have to worry about doing this again any time soon. Signed-off-by: Paul Moore <[email protected]> Signed-off-by: Paul Moore <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-01doc: Update the MAINTAINERS info for Paul MoorePaul Moore1-3/+3
My @hp.com will no longer be valid starting August 5, 2011 so an update is necessary. My new email address is employer independent so we don't have to worry about doing this again any time soon. Signed-off-by: Paul Moore <[email protected]> Signed-off-by: Paul Moore <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-01atm: br2864: sent packets truncated in VC routed modeChas Williams1-2/+0
Reported-by: Pascal Hambourg <[email protected]> Signed-off-by: Chas Williams <[email protected]> Signed-off-by: David S. Miller <[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