• Andrew Morton's avatar
    [PATCH] dm-ioctl: replace dm_[add|remove]_wait_queue() with dm_wait_event() · 52414318
    Andrew Morton authored
    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: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    52414318
dm-ioctl.c 27 KB