kernel-ark/drivers/md
NeilBrown d6b42dcb99 md/raid1,raid10: avoid deadlock during resync/recovery.
If RAID1 or RAID10 is used under LVM or some other stacking
block device, it is possible to enter a deadlock during
resync or recovery.
This can happen if the upper level block device creates
two requests to the RAID1 or RAID10.  The first request gets
processed, blocks recovery and queue requests for underlying
requests in current->bio_list.  A resync request then starts
which will wait for those requests and block new IO.

But then the second request to the RAID1/10 will be attempted
and it cannot progress until the resync request completes,
which cannot progress until the underlying device requests complete,
which are on a queue behind that second request.

So allow that second request to proceed even though there is
a resync request about to start.

This is suitable for any -stable kernel.

Cc: stable@vger.kernel.org
Reported-by: Ray Morris <support@bettercgi.com>
Tested-by: Ray Morris <support@bettercgi.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2012-03-19 12:46:38 +11:00
..
persistent-data device-mapper: using EXPORT_SYBOL in dm-space-map-checker.c needs export.h 2011-11-07 10:29:10 -08:00
bitmap.c md/bitmap: ensure to load bitmap when creating via sysfs. 2012-03-19 12:46:37 +11:00
bitmap.h
dm-bio-record.h
dm-bufio.c device-mapper: dm-bufio.c needs to include module.h 2011-11-07 10:29:10 -08:00
dm-bufio.h
dm-crypt.c
dm-delay.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm flakey: fix crash on read when corrupt_bio_byte not set 2012-03-07 19:09:39 +00:00
dm-io.c dm io: fix discard support 2012-03-07 19:09:37 +00:00
dm-ioctl.c dm ioctl: do not leak argv if target message only contains whitespace 2012-03-07 19:09:34 +00:00
dm-kcopyd.c
dm-linear.c dm: do not forward ioctls from logical volumes to the underlying device 2012-01-14 15:07:24 -08:00
dm-log-userspace-base.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm: do not forward ioctls from logical volumes to the underlying device 2012-01-14 15:07:24 -08:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid1.c
dm-raid.c dm raid: fix flush support 2012-03-07 19:09:48 +00:00
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c
dm-stripe.c
dm-sysfs.c
dm-table.c block: Introduce blk_set_stacking_limits function 2012-01-11 16:27:11 +01:00
dm-target.c
dm-thin-metadata.c dm thin metadata: decrement counter after removing mapped block 2012-03-07 19:09:44 +00:00
dm-thin-metadata.h
dm-thin.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c fs: move code out of buffer.c 2012-01-03 22:54:07 -05:00
dm.h
faulty.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
Kconfig
linear.c md/linear: fix hot-add of devices to linear arrays. 2011-12-23 09:56:55 +11:00
linear.h
Makefile
md.c md: don't set md arrays to readonly on shutdown. 2012-03-19 12:46:37 +11:00
md.h md: create externally visible flags for supporting hot-replace. 2011-12-23 10:17:51 +11:00
multipath.c md: change hot_remove_disk to take an rdev rather than a number. 2011-12-23 10:17:51 +11:00
multipath.h
raid0.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
raid0.h
raid1.c md/raid1,raid10: avoid deadlock during resync/recovery. 2012-03-19 12:46:38 +11:00
raid1.h md/raid1: Allocate spare to store replacement devices and their bios. 2011-12-23 10:17:56 +11:00
raid5.c md: allow re-add to failed arrays. 2012-03-19 12:46:37 +11:00
raid5.h md/raid5: detect and handle replacements during recovery. 2011-12-23 10:17:53 +11:00
raid10.c md/raid1,raid10: avoid deadlock during resync/recovery. 2012-03-19 12:46:38 +11:00
raid10.h md/raid10: prepare data structures for handling replacement. 2011-12-23 10:17:54 +11:00