]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] md: fix a plug/unplug race in raid5
authorNeilBrown <neilb@suse.de>
Mon, 10 Jul 2006 11:44:16 +0000 (04:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:16 +0000 (13:24 -0700)
commit1c186f50e085150f422de8740be0fdb5f5655fd7
treede115f4692b1be55ae3ad93a2719edc5b5688a37
parent1e8de479086b65c052e6d5dfb973440d4e69e376
[PATCH] md: fix a plug/unplug race in raid5

When a device is unplugged, requests are moved from one or two (depending on
whether a bitmap is in use) queues to the main request queue.

So whenever requests are put on either of those queues, we should make sure
the raid5 array is 'plugged'.  However we don't.  We currently plug the raid5
queue just before putting requests on queues, so there is room for a race.  If
something unplugs the queue at just the wrong time, requests will be left on
the queue and nothing will want to unplug them.  Normally something else will
plug and unplug the queue fairly soon, but there is a risk that nothing will.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid5.c