aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-03ext4: use kzalloc in ext4_kzalloc()Mathias Krause1-1/+1
Commit 9933fc0i (ext4: introduce ext4_kvmalloc(), ext4_kzalloc(), and ext4_kvfree()) intruduced wrappers around k*alloc/vmalloc but introduced a typo for ext4_kzalloc() by not using kzalloc() but kmalloc(). Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-08-03Merge branch 'apei' into apei-releaseLen Brown35-135/+1172
Some trivial conflicts due to other various merges adding to the end of common lists sooner than this one. arch/ia64/Kconfig arch/powerpc/Kconfig arch/x86/Kconfig lib/Kconfig lib/Makefile Signed-off-by: Len Brown <[email protected]>
2011-08-03ACPI, APEI, EINJ Param support is disabled by defaultHuang Ying2-17/+33
EINJ parameter support is only usable for some specific BIOS. Originally, it is expected to have no harm for BIOS does not support it. But now, we found it will cause issue (memory overwriting) for some BIOS. So param support is disabled by default and only enabled when newly added module parameter named "param_extension" is explicitly specified. Signed-off-by: Huang Ying <[email protected]> Cc: Matthew Garrett <[email protected]> Acked-by: Don Zickus <[email protected]> Acked-by: Tony Luck <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03APEI GHES: 32-bit buildfixLen Brown1-2/+3
drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression ghes.c:(.text+0x46289): undefined reference to `__udivdi3'   in function ghes_estatus_cache_add(). Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03ACPI: APEI build fixLen Brown2-2/+4
as GHES is optional... When # CONFIG_ACPI_APEI_GHES is not set: (.init.text+0x4c22): undefined reference to `ghes_disable' Reported-by: Randy Dunlap <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03ACPI, APEI, GHES: Add hardware memory error recovery supportHuang Ying2-7/+24
memory_failure_queue() is called when recoverable memory errors are notified by firmware to do the recovery work. Signed-off-by: Huang Ying <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03HWPoison: add memory_failure_queue()Huang Ying2-0/+93
memory_failure() is the entry point for HWPoison memory error recovery. It must be called in process context. But commonly hardware memory errors are notified via MCE or NMI, so some delayed execution mechanism must be used. In MCE handler, a work queue + ring buffer mechanism is used. In addition to MCE, now APEI (ACPI Platform Error Interface) GHES (Generic Hardware Error Source) can be used to report memory errors too. To add support to APEI GHES memory recovery, a mechanism similar to that of MCE is implemented. memory_failure_queue() is the new entry point that can be called in IRQ context. The next step is to make MCE handler uses this interface too. Signed-off-by: Huang Ying <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03ACPI, APEI, GHES, Error records content based throttleHuang Ying1-7/+177
printk is used by GHES to report hardware errors. Ratelimit is enforced on the printk to avoid too many hardware error reports in kernel log. Because there may be thousands or even millions of corrected hardware errors during system running. Currently, a simple scheme is used. That is, the total number of hardware error reporting is ratelimited. This may cause some issues in practice. For example, there are two kinds of hardware errors occurred in system. One is corrected memory error, because the fault memory address is accessed frequently, there may be hundreds error report per-second. The other is corrected PCIe AER error, it will be reported once per-second. Because they share one ratelimit control structure, it is highly possible that only memory error is reported. To avoid the above issue, an error record content based throttle algorithm is implemented in the patch. Where after the first successful reporting, all error records that are same are throttled for some time, to let other kinds of error records have the opportunity to be reported. In above example, the memory errors will be throttled for some time, after being printked. Then the PCIe AER error will be printked successfully. Signed-off-by: Huang Ying <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03ACPI, APEI, GHES, printk support for recoverable error via NMIHuang Ying2-18/+193
Some APEI GHES recoverable errors are reported via NMI, but printk is not safe in NMI context. To solve the issue, a lock-less memory allocator is used to allocate memory in NMI handler, save the error record into the allocated memory, put the error record into a lock-less list. On the other hand, an irq_work is used to delay the operation from NMI context to IRQ context. The irq_work IRQ handler will remove nodes from lock-less list, printk the error record and do some further processing include recovery operation, then free the memory. Signed-off-by: Huang Ying <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03lib, Make gen_pool memory allocator locklessHuang Ying4-65/+272
This version of the gen_pool memory allocator supports lockless operation. This makes it safe to use in NMI handlers and other special unblockable contexts that could otherwise deadlock on locks. This is implemented by using atomic operations and retries on any conflicts. The disadvantage is that there may be livelocks in extreme cases. For better scalability, one gen_pool allocator can be used for each CPU. The lockless operation only works if there is enough memory available. If new memory is added to the pool a lock has to be still taken. So any user relying on locklessness has to ensure that sufficient memory is preallocated. The basic atomic operation of this allocator is cmpxchg on long. On architectures that don't have NMI-safe cmpxchg implementation, the allocator can NOT be used in NMI handler. So code uses the allocator in NMI handler should depend on CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG. Signed-off-by: Huang Ying <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03lib, Add lock-less NULL terminated single listHuang Ying4-0/+260
Cmpxchg is used to implement adding new entry to the list, deleting all entries from the list, deleting first entry of the list and some other operations. Because this is a single list, so the tail can not be accessed in O(1). If there are multiple producers and multiple consumers, llist_add can be used in producers and llist_del_all can be used in consumers. They can work simultaneously without lock. But llist_del_first can not be used here. Because llist_del_first depends on list->first->next does not changed if list->first is not changed during its operation, but llist_del_first, llist_add, llist_add (or llist_del_all, llist_add, llist_add) sequence in another consumer may violate that. If there are multiple producers and one consumer, llist_add can be used in producers and llist_del_all or llist_del_first can be used in the consumer. This can be summarized as follow: | add | del_first | del_all add | - | - | - del_first | | L | L del_all | | | - Where "-" stands for no lock is needed, while "L" stands for lock is needed. The list entries deleted via llist_del_all can be traversed with traversing function such as llist_for_each etc. But the list entries can not be traversed safely before deleted from the list. The order of deleted entries is from the newest to the oldest added one. If you want to traverse from the oldest to the newest, you must reverse the order by yourself before traversing. The basic atomic operation of this list is cmpxchg on long. On architectures that don't have NMI-safe cmpxchg implementation, the list can NOT be used in NMI handler. So code uses the list in NMI handler should depend on CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG. Signed-off-by: Huang Ying <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHGHuang Ying13-0/+15
cmpxchg() is widely used by lockless code, including NMI-safe lockless code. But on some architectures, the cmpxchg() implementation is not NMI-safe, on these architectures the lockless code may need a spin_trylock_irqsave() based implementation. This patch adds a Kconfig option: ARCH_HAVE_NMI_SAFE_CMPXCHG, so that NMI-safe lockless code can depend on it or provide different implementation according to it. On many architectures, cmpxchg is only NMI-safe for several specific operand sizes. So, ARCH_HAVE_NMI_SAFE_CMPXCHG define in this patch only guarantees cmpxchg is NMI-safe for sizeof(unsigned long). Signed-off-by: Huang Ying <[email protected]> Acked-by: Mike Frysinger <[email protected]> Acked-by: Paul Mundt <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Chris Metcalf <[email protected]> Acked-by: Richard Henderson <[email protected]> CC: Mikael Starvik <[email protected]> Acked-by: David Howells <[email protected]> CC: Yoshinori Sato <[email protected]> CC: Tony Luck <[email protected]> CC: Hirokazu Takata <[email protected]> CC: Geert Uytterhoeven <[email protected]> CC: Michal Simek <[email protected]> Acked-by: Ralf Baechle <[email protected]> CC: Kyle McMartin <[email protected]> CC: Martin Schwidefsky <[email protected]> CC: Chen Liqin <[email protected]> CC: "David S. Miller" <[email protected]> CC: Ingo Molnar <[email protected]> CC: Chris Zankel <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-03dt: add of_alias_scan and of_alias_get_idShawn Guo4-2/+141
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. Signed-off-by: Shawn Guo <[email protected]> [grant.likely: add locking and rework parse loop] Signed-off-by: Grant Likely <[email protected]>
2011-08-03tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_dataKiran Patil3-49/+78
Problem: HW DDP context was not invalidated in case of ABORTS, etc... This leads to the problem where memory pages which are used for DDP as user descriptor could get reused for some other purpose (such as to satisfy new memory allocation request either by kernel or user mode threads) and since HW DDP context was not invalidated, HW continue to write to those pages, hence causing memory corruption. Fix: Either on incoming ABORTS or due to exchange time out, allowed the target to cleanup HW DDP context if it was setup for respective ft_cmd. Added new function to perform this cleanup, furthur it can be enhanced for other cleanup activity. Fix ft_recv_write_data() to properly handle fc_frame_payload_get to return pointer to payload if it exist. If there is no payload which is most common case (+ve case in case if DDP is working as expected, it will return NULL. Yes, scope of buf is limited to printk. Invalidation of HW context (which is done inside ft_invl_hw_context() is necessary in SUCCESS and FAILURE case of DDP. Hence invalidation is DONE as long as there was DDP setup (whether it worked correctly or not, NOTE: For some reason, if there is any error w.r.t DDP such as out of order packet reception, HW simply post the full packet in rx queue. Signed-off-by: Kiran Patil <[email protected]> Cc: Robert W Love <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-08-02Merge branch 'pstore-efi' of ↵Linus Torvalds1-3/+3
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: fix warnings when CONFIG_PSTORE=n
2011-08-02Merge branch 'tools-release' of ↵Linus Torvalds2-26/+25
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 * 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6: tools/power turbostat: fit output into 80 columns on snb-ep tools/power x86_energy_perf_policy: fix print of uninitialized string
2011-08-02Merge branch 'release' of ↵Linus Torvalds30-132/+352
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits) ACPI: delete stale reference in kernel-parameters.txt ACPI: add missing _OSI strings ACPI: remove NID_INVAL thermal: make THERMAL_HWMON implementation fully internal thermal: split hwmon lookup to a separate function thermal: hide CONFIG_THERMAL_HWMON ACPI print OSI(Linux) warning only once ACPI: DMI workaround for Asus A8N-SLI Premium and Asus A8N-SLI DELUX ACPI / Battery: propagate sysfs error in acpi_battery_add() ACPI / Battery: avoid acpi_battery_add() use-after-free ACPI: introduce "acpi_rsdp=" parameter for kdump ACPI: constify ops structs ACPI: fix CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS ACPI: fix 80 char overflow ACPI / Battery: Resolve the race condition in the sysfs_remove_battery() ACPI / Battery: Add the check before refresh sysfs in the battery_notify() ACPI / Battery: Add the hibernation process in the battery_notify() ACPI / Battery: Rename acpi_battery_quirks2 with acpi_battery_quirks ACPI / Battery: Change 16-bit signed negative battery current into correct value ACPI / Battery: Add the power unit macro ...
2011-08-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds46-49/+576
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile/mm/init.c: trivial: use BUG_ON arch/tile: remove useless set_fixmap_nocache() macro arch/tile: add hypervisor-based character driver for SPI flash ROM ioctl-number.txt: add the tile hardwall ioctl range tile: use generic-y format for one-line asm-generic headers clocksource: tile: convert to use clocksource_register_hz
2011-08-02Merge branch 'for-linus' of ↵Linus Torvalds19-528/+269
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (31 commits) Btrfs: don't call writepages from within write_full_page Btrfs: Remove unused variable 'last_index' in file.c Btrfs: clean up for find_first_extent_bit() Btrfs: clean up for wait_extent_bit() Btrfs: clean up for insert_state() Btrfs: remove unused members from struct extent_state Btrfs: clean up code for merging extent maps Btrfs: clean up code for extent_map lookup Btrfs: clean up search_extent_mapping() Btrfs: remove redundant code for dir item lookup Btrfs: make acl functions really no-op if acl is not enabled Btrfs: remove remaining ref-cache code Btrfs: remove a BUG_ON() in btrfs_commit_transaction() Btrfs: use wait_event() Btrfs: check the nodatasum flag when writing compressed files Btrfs: copy string correctly in INO_LOOKUP ioctl Btrfs: don't print the leaf if we had an error btrfs: make btrfs_set_root_node void Btrfs: fix oops while writing data to SSD partitions Btrfs: Protect the readonly flag of block group ... Fix up trivial conflicts (due to acl and writeback cleanups) in - fs/btrfs/acl.c - fs/btrfs/ctree.h - fs/btrfs/extent_io.c
2011-08-02Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds5-11/+16
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: MAINTAINERS: Add keyword match for of_match_table to device tree section of: constify property name parameters for helper functions input: xilinx_ps2: Add missing of_address.h header of: address: use resource_size helper
2011-08-02Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds1-8/+3
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: spi/pl022: remove function cannot exit
2011-08-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dmLinus Torvalds21-404/+1561
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (34 commits) dm table: set flush capability based on underlying devices dm crypt: optionally support discard requests dm raid: add md raid1 support dm raid: support metadata devices dm raid: add write_mostly parameter dm raid: add region_size parameter dm raid: improve table parameters documentation dm ioctl: forbid multiple device specifiers dm ioctl: introduce __get_dev_cell dm ioctl: fill in device parameters in more ioctls dm flakey: add corrupt_bio_byte feature dm flakey: add drop_writes dm flakey: support feature args dm flakey: use dm_target_offset and support discards dm table: share target argument parsing functions dm snapshot: skip reading origin when overwriting complete chunk dm: ignore merge_bvec for snapshots when safe dm table: clean dm_get_device and move exports dm raid: tidy includes dm ioctl: prevent empty message ...
2011-08-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdogLinus Torvalds3-4/+9
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog: watchdog: Cleanup WATCHDOG_CORE help text watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards watchdog: shwdt: fix usage of mod_timer
2011-08-02Merge branch 'for-linus' of ↵Linus Torvalds6-14/+128
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: asihpi - Clarify adapter index validity check ALSA: asihpi - Don't leak firmware if mem alloc fails ALSA: rtctimer.c needs module.h ASoC: Fix txx9aclc.c build ALSA: hdspm - Add firmware revision 0xcc for RME MADI ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface ALSA: sound/core/pcm_compat.c: adjust array index
2011-08-02Input: ad7879 - fix deficient device disableMichael Hennerich1-1/+3
Input close or device disable should not interact with the exported gpiolib functionality. However that's the case. __ad7879_disable() clears the entire AD7879_REG_CTRL2, while it should just power down the ADC and its reference. Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-08-02Input: gpio_keys - fix two typos in devicetree documentationTobias Klauser1-1/+1
Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2011-08-02tools/power turbostat: fit output into 80 columns on snb-epLen Brown1-23/+23
Reduce columns for package number to 1. If you can afford more than 9 packages, you can also afford a terminal with more than 80 columns:-) Also shave a column also off the package C-states Signed-off-by: Len Brown <[email protected]>
2011-08-02efivars: fix warnings when CONFIG_PSTORE=nTony Luck1-3/+3
drivers/firmware/efivars.c:161: warning: ‘utf16_strlen’ defined but not used utf16_strlen() is only used inside CONFIG_PSTORE - make this "static inline" to shut the compiler up [thanks to hpa for the suggestion]. drivers/firmware/efivars.c:602: warning: initialization from incompatible pointer type Between v1 and v2 of this patch series we decided to make the "part" number unsigned - but missed fixing the stub version of efi_pstore_write() Acked-by: Matthew Garrett <[email protected]> Acked-by: Mike Waychison <[email protected]> Signed-off-by: Tony Luck <[email protected]>
2011-08-02Merge branches 'acpica', 'battery', 'boot-irqs', 'bz-24492', 'bz-9528', ↵Len Brown157-744/+1471
'from-akpm', 'kexec-param' and 'misc' into release Conflicts: Documentation/kernel-parameters.txt Signed-off-by: Len Brown <[email protected]>
2011-08-02ACPI: delete stale reference in kernel-parameters.txtLen Brown1-2/+0
Says for acpi= See also Documentation/power/pm.txt, pci=noacpi but this file does not exist Reported-by: Alan Cox <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02arch/tile/mm/init.c: trivial: use BUG_ONJulia Lawall1-2/+1
Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2011-08-02Merge tag 'v3.0' of ↵Chris Metcalf1367-8728/+40132
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
2011-08-02ACPI: add missing _OSI stringsShaohua Li1-1/+7
Linux supports some optional features, but it should notify the BIOS about them via the _OSI method. Currently Linux doesn't notify any, which might make such features not work because the BIOS doesn't know about them. Jarosz has a system which needs this to make ACPI processor aggregator device work. Reported-by: "Jarosz, Sebastian" <[email protected]> Signed-off-by: Shaohua Li <[email protected]> Acked-by: Matthew Garrett <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02ACPI: remove NID_INVALDavid Rientjes1-1/+0
b552a8c56db8 ("ACPI: remove NID_INVAL") removed the left over uses of NID_INVAL, but didn't actually remove the definition. Remove it. Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02thermal: make THERMAL_HWMON implementation fully internalJean Delvare2-47/+92
THERMAL_HWMON is implemented inside the thermal_sys driver and has no effect on drivers implementing thermal zones, so they shouldn't see anything related to it in <linux/thermal.h>. Making the THERMAL_HWMON implementation fully internal has two advantages beyond the cleaner design: * This avoids rebuilding all thermal drivers if the THERMAL_HWMON implementation changes, or if CONFIG_THERMAL_HWMON gets enabled or disabled. * This avoids breaking the thermal kABI in these cases too, which should make distributions happy. The only drawback I can see is slightly higher memory fragmentation, as the number of kzalloc() calls will increase by one per thermal zone. But I doubt it will be a problem in practice, as I've never seen a system with more than two thermal zones. Signed-off-by: Jean Delvare <[email protected]> Cc: Rene Herman <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02thermal: split hwmon lookup to a separate functionJean Delvare1-6/+19
We'll soon need to reuse it. Signed-off-by: Jean Delvare <[email protected]> Cc: Rene Herman <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02thermal: hide CONFIG_THERMAL_HWMONJean Delvare2-15/+2
It's about time to revert 16d752397301b9 ("thermal: Create CONFIG_THERMAL_HWMON=n"). Anybody running a kernel >= 2.6.40 would also be running a recent enough version of lm-sensors. Actually having CONFIG_THERMAL_HWMON is pretty convenient so instead of dropping it, we keep it but hide it. Signed-off-by: Jean Delvare <[email protected]> Cc: Rene Herman <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-08-02MAINTAINERS: Add keyword match for of_match_table to device tree sectionMark Brown1-0/+1
If a patch is working with an of_match_table it's probably adding an OF binding to a driver in which case the binding ought to be reviewed by the device tree folks to make sure that things like the device matches are set up correctly. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-08-02of: constify property name parameters for helper functionsJamie Iles2-9/+13
The helper functions for reading u32 integers, u32 arrays and strings should have the property name as a const pointer. Cc: Grant Likely <[email protected]> Signed-off-by: Jamie Iles <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-08-02spi/pl022: remove function cannot exitLinus Walleij1-8/+3
The remove function in the PL022 driver cannot abort the remove function any way, so restructure the code so as not to make that assumption. Remove will now proceed no matter whether it can stop the transfer queue or not. Reported-by: Russell King <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-08-02dm table: set flush capability based on underlying devicesMike Snitzer2-1/+43
DM has always advertised both REQ_FLUSH and REQ_FUA flush capabilities regardless of whether or not a given DM device's underlying devices also advertised a need for them. Block's flush-merge changes from 2.6.39 have proven to be more costly for DM devices. Performance regressions have been reported even when DM's underlying devices do not advertise that they have a write cache. Fix the performance regressions by configuring a DM device's flushing capabilities based on those of the underlying devices' capabilities. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
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]>