]> git.hungrycats.org Git - linux/commit
[PATCH] dm-ioctl: replace dm_[add|remove]_wait_queue() with dm_wait_event()
authorAndrew Morton <akpm@osdl.org>
Sat, 29 May 2004 03:57:19 +0000 (20:57 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 29 May 2004 03:57:19 +0000 (20:57 -0700)
commit52414318a62cba27ea917901f2e68bd2e20444c4
tree1938de6972c7c723bf4c9e2e829af654489a9f45
parent0f76498d7ed6e0cf773e00937d000dd0749a31fe
[PATCH] dm-ioctl: replace dm_[add|remove]_wait_queue() with dm_wait_event()

From: Kevin Corry <kevcorry@us.ibm.com>

Some testing of DM multipath has turned up a problem with the DEVICE_WAIT
command.  In the tests, while performing a DEVICE_WAIT on a multipath device,
the command sometimes returns immediately, even though the event-number is
correct and no path-failure has occurred to trigger an event.  The problem was
tracked down to the call to schedule() in dev_wait(), which would return even
though it was not woken up by a DM table event.

This patch moves the responsibility for waiting from the ioctl interface into
the core driver, and uses wait_event_interruptible() instead of relying on
wait-queues and schedule().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm-ioctl.c
drivers/md/dm.c
drivers/md/dm.h