]> bbs.cooldavid.org Git - net-next-2.6.git/commit
md/raid10: fix deadlock with unaligned read during resync
authorNeilBrown <neilb@suse.de>
Sat, 7 Aug 2010 11:17:00 +0000 (21:17 +1000)
committerNeilBrown <neilb@suse.de>
Sat, 7 Aug 2010 11:17:00 +0000 (21:17 +1000)
commit51e9ac77035a3dfcb6fc0a88a0d80b6f99b5edb1
tree94167223c5711c47169db672a0ec0d23a36208b9
parent69e51b449d383e97b1b9f890f8378c96e9e17346
md/raid10: fix deadlock with unaligned read during resync

If the 'bio_split' path in raid10-read is used while
resync/recovery is happening it is possible to deadlock.
Fix this be elevating ->nr_waiting for the duration of both
parts of the split request.

This fixes a bug that has been present since 2.6.22
but has only started manifesting recently for unknown reasons.
It is suitable for and -stable since then.

Reported-by: Justin Bronder <jsbronder@gentoo.org>
Tested-by: Justin Bronder <jsbronder@gentoo.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
drivers/md/raid10.c