All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Yasui <tyasui@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: k-ueda@ct.jp.nec.com, LVM2 development <lvm-devel@redhat.com>
Subject: [RFC][PATCH 0/4] dm-raid1: fix deadlock at suspend after suspend was interrupted (v2)
Date: Tue, 23 Feb 2010 13:45:00 -0500	[thread overview]
Message-ID: <4B84222C.9030102@redhat.com> (raw)

Hi,

This is an update patch set to fix deadlock on suspending of mirror device.
Based on the Ueda-san's suggestion, I updated the patch set so that a target's
resume handler is used instead of introducing new handler (cancel_presuspend).


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
========

Restore the target's state change by calling a target's specific resume handler
when its suspend procedure was interrupted after its presuspend handler completed.


PATCH SET
=========
    1/4: dm: restore presuspend status
    2/4: dm-log: update resume method for interruption of presuspend
    3/4: dm-crypt: update resume method for interruption of presuspend
    4/4: cmirror: update resume method for interruption of presuspend

    NOTE: The cmirror patch (4/4) hasn't been tested yet.


I appreciate your comments.

Thanks,
Taka

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

WARNING: multiple messages have this Message-ID (diff)
From: Takahiro Yasui <tyasui@redhat.com>
To: lvm-devel@redhat.com
Subject: [RFC][PATCH 0/4] dm-raid1: fix deadlock at suspend after suspend was interrupted (v2)
Date: Tue, 23 Feb 2010 13:45:00 -0500	[thread overview]
Message-ID: <4B84222C.9030102@redhat.com> (raw)

Hi,

This is an update patch set to fix deadlock on suspending of mirror device.
Based on the Ueda-san's suggestion, I updated the patch set so that a target's
resume handler is used instead of introducing new handler (cancel_presuspend).


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
========

Restore the target's state change by calling a target's specific resume handler
when its suspend procedure was interrupted after its presuspend handler completed.


PATCH SET
=========
    1/4: dm: restore presuspend status
    2/4: dm-log: update resume method for interruption of presuspend
    3/4: dm-crypt: update resume method for interruption of presuspend
    4/4: cmirror: update resume method for interruption of presuspend

    NOTE: The cmirror patch (4/4) hasn't been tested yet.


I appreciate your comments.

Thanks,
Taka



             reply	other threads:[~2010-02-23 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 18:45 Takahiro Yasui [this message]
2010-02-23 18:45 ` [RFC][PATCH 0/4] dm-raid1: fix deadlock at suspend after suspend was interrupted (v2) Takahiro Yasui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B84222C.9030102@redhat.com \
    --to=tyasui@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.