All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] dm-raid1: fix deadlock at suspend after suspend was interrupted
@ 2010-01-19 20:40 Takahiro Yasui
  2010-01-20  2:47 ` Kiyoshi Ueda
  0 siblings, 1 reply; 5+ messages in thread
From: Takahiro Yasui @ 2010-01-19 20:40 UTC (permalink / raw)
  To: device-mapper development

Hi,

This is a patch set to fix deadlock on suspending of mirror device.


ISSUE
=====

Suspend procedure on a dm-mirror device could cause deadlock on recovery_count
semaphore.

When mirror_presuspend is called, recovery_count semaphore is acquired in
dm_rh_stop_recovery() to stop recovery routine, but when an signal is caught
in dm_wait_for_completion() or an error occurred in in dm_suspend(),
the suspend process is interrupted without releasing recovery_count semaphore
of a mirror device. This means that another suspend is executed, and then
the suspend process gets stuck at dm_rh_stop_recovery().

When suspend procedure is interrupted, the device should work properly since
the status of the device is not "suspended."


SOLUTION
========

Introduce a target handler, cancel_presuspend, to cancel status changes
done by a target specific presuspend handler.


PATCH SET
=========
    1/3: dm: introduce cancel_presuspend framework
    2/3: dm-raid1: add cancel_presuspend function
    3/3: dm-delay: add cancel_presuspend function


I appreciate your comments.

Thanks,
-- 
Takahiro Yasui
Hitachi Computer Products (America), Inc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-22  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 20:40 [RFC][PATCH 0/3] dm-raid1: fix deadlock at suspend after suspend was interrupted Takahiro Yasui
2010-01-20  2:47 ` Kiyoshi Ueda
2010-01-20 22:58   ` Takahiro Yasui
2010-01-21  9:20     ` Kiyoshi Ueda
2010-01-22  6:16       ` Takahiro Yasui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.