1
0
Fork 0
alistair23-linux/drivers
NeilBrown 7ceb17e87b md: Allow devices to be re-added to a read-only array.
When assembling an array incrementally we might want to make
it device available when "enough" devices are present, but maybe
not "all" devices are present.
If the remaining devices appear before the array is actually used,
they should be added transparently.

We do this by using the "read-auto" mode where the array acts like
it is read-only until a write request arrives.

Current an add-device request switches a read-auto array to active.
This means that only one device can be added after the array is first
made read-auto.  This isn't a problem for RAID5, but is not ideal for
RAID6 or RAID10.
Also we don't really want to switch the array to read-auto at all
when re-adding a device as this doesn't really imply any change.

So:
 - remove the "md_update_sb()" call from add_new_disk().  This isn't
   really needed as just adding a disk doesn't require a metadata
   update.  Instead, just set MD_CHANGE_DEVS.  This will effect a
   metadata update soon enough, once the array is not read-only.

 - Allow the ADD_NEW_DISK ioctl to succeed without activating a
   read-auto array, providing the MD_DISK_SYNC flag is set.
   In this case, the device will be rejected if it cannot be added
   with the correct device number, or has an incorrect event count.

 - Teach remove_and_add_spares() to be careful about adding spares
   when the array is read-only (or read-mostly) - only add devices
   that are thought to be in-sync, and only do it if the array is
   in-sync itself.

 - In md_check_recovery, use remove_and_add_spares in the read-only
   case, rather than open coding just the 'remove' part of it.

Reported-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-04-24 11:42:42 +10:00
..
accessibility
acpi PCI updates for v3.9: 2013-04-05 19:29:36 -07:00
amba ARM: 7675/1: amba: tegra-ahb: Fix build error w/ PM_SLEEP w/o PM_RUNTIME 2013-03-15 17:20:02 +00:00
ata [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression 2013-04-03 19:48:49 -04:00
atm
auxdisplay
base regmap: Back out work buffer fix 2013-04-09 18:03:25 +01:00
bcma Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-03-01 13:52:03 -05:00
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2013-04-17 12:52:02 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-03-18 15:17:11 -04:00
bus
cdrom
char vm: convert HPET mmap to vm_iomap_memory() helper 2013-04-19 09:46:39 -07:00
clk clk: tegra: Allow PLLE training to succeed 2013-04-01 11:44:38 -07:00
clocksource ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
connector
cpufreq cpufreq / intel_pstate: Set timer timeout correctly 2013-04-08 22:09:23 +02:00
cpuidle
crypto crypto: ux500 - add missing comma 2013-04-05 21:02:17 +08:00
dca
devfreq
dio
dma dmaengine: at_hdmac: fix race condition in atc_advance_work() 2013-04-18 08:54:22 -07:00
edac EDAC: Merge mci.mem_is_per_rank with mci.csbased 2013-03-16 06:32:30 +01:00
eisa EISA/PCI: Init EISA early, before PNP 2013-04-01 12:02:05 -06:00
extcon extcon: max77693: Initialize register of MUIC device to bring up it without platform data 2013-03-13 17:38:57 +09:00
firewire
firmware Move utf16 functions to kernel core and rename 2013-04-15 21:23:03 +01:00
gpio gpio: pca953x: fix irq_domain_add_simple usage 2013-04-11 19:01:19 +02:00
gpu drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event 2013-04-12 14:21:12 +10:00
hid HID: magicmouse: fix race between input_register() and probe() 2013-04-04 09:49:56 +02:00
hsi hsi: fix kernel-doc warnings 2013-03-01 13:39:00 -08:00
hv
hwmon hwmon: (lm75.h) Update header inclusion 2013-03-18 21:19:49 +01:00
hwspinlock hwspinlock: fix __hwspin_lock_request error path 2013-04-05 17:45:11 +03:00
i2c ACPI / I2C: Use parent's ACPI_HANDLE() in acpi_i2c_register_devices() 2013-04-02 15:30:41 +02:00
ide
idle intel_idle: additional Haswell CPU-id 2013-03-15 10:55:31 -04:00
iio First round of iio fixes post the 3.9 merge window. 2013-03-06 05:48:24 +08:00
infiniband firmware,IB/qib: revert firmware file move 2013-04-05 12:19:39 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-04-19 09:15:13 -07:00
iommu IOMMU fixes for Linux v3.9-rc4 2013-03-27 09:25:11 -07:00
ipack
irqchip irqchip: gic: fix irq_trigger return 2013-03-26 20:52:25 +01:00
isdn isdn: hisax: netjet requires VIRT_TO_BUS 2013-03-17 12:01:10 -04:00
leds
lguest
macintosh
mailbox mailbox, pl320-ipc: remove __init from probe function 2013-03-04 14:23:11 +01:00
md md: Allow devices to be re-added to a read-only array. 2013-04-24 11:42:42 +10:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-04-04 08:40:45 -07:00
memory
memstick
message
mfd mfd: twl4030-madc: Remove __exit_p annotation 2013-03-15 07:42:22 +01:00
misc misc/vmw_vmci: Add dependency on CONFIG_NET 2013-04-03 11:53:39 -07:00
mmc Merge branches 'devel-stable', 'fixes' and 'mmci' into for-linus 2013-03-03 00:32:50 +00:00
mtd mtdchar: remove no-longer-used vma helpers 2013-04-19 10:05:39 -07:00
net net: ax88796: avoid 64 bit arithmetic 2013-04-19 17:57:48 -04:00
nfc NFC: microread: Fix build failure due to a new MEI bus API 2013-04-01 00:52:42 +02:00
ntb
nubus
of
oprofile fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
parisc
parport
pci PCI/PM: Disable runtime PM of PCIe ports 2013-04-03 15:54:59 -06:00
pcmcia
pinctrl Here are a few pinctrl fixes for the v3.9 rc series: 2013-03-24 10:11:29 -07:00
platform Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2013-04-18 15:14:34 -07:00
pnp ACPI / glue: Add .match() callback to struct acpi_bus_type 2013-03-04 14:23:40 +01:00
power
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branch 'regulator/fix/twl' into tmp 2013-03-05 10:12:43 +08:00
remoteproc remoteproc: fix FW_CONFIG typo 2013-04-07 15:11:27 +03:00
rpmsg
rtc Revert "drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR" 2013-04-05 09:36:53 -07:00
s390 qeth: fix qeth_wait_for_threads() deadlock for OSN devices 2013-04-08 17:16:57 -04:00
sbus bbc_i2c: fix section mismatch warning 2013-03-31 19:29:12 -04:00
scsi [SCSI] lpfc: fix potential NULL pointer dereference in lpfc_sli4_rq_put() 2013-04-11 14:17:15 -07:00
sfi
sh
sn
spi spi: Fixes for v3.9 2013-04-05 10:04:41 -07:00
ssb ssb: implement spurious tone avoidance 2013-04-10 10:31:26 -04:00
staging staging: comedi: s626: fix continuous acquisition 2013-03-25 11:35:38 -07:00
target target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs 2013-04-11 01:48:49 -07:00
tc
thermal thermal: exynos_thermal: return a proper error code while thermal_zone_device_register fail. 2013-03-11 23:09:29 +08:00
tty tty: mxser: fix cycle termination condition in mxser_probe() and mxser_module_init() 2013-04-08 11:30:04 -07:00
uio
usb USB / PM: Don't try to hide PM QoS flags from usb_port_device_release() 2013-04-02 01:25:09 +02:00
uwb
vfio vfio-pci: Fix possible integer overflow 2013-03-26 11:33:16 -06:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-04-12 15:26:42 -07:00
video vm: convert fb_mmap to vm_iomap_memory() helper 2013-04-19 09:57:35 -07:00
virt
virtio
vlynq
vme
w1 w1: fix oops when w1_search is called from netlink connector 2013-03-12 16:20:46 -07:00
watchdog watchdog: Revert the AT91RM9200_WATCHDOG dependency 2013-04-14 09:09:10 +02:00
xen Bug-fixes: 2013-04-10 15:57:33 -07:00
zorro
Kconfig
Makefile