From: Takahiro Yasui <tyasui@redhat.com>
To: k-ueda@ct.jp.nec.com
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [RFC][PATCH 0/3] dm-raid1: fix deadlock at suspend after suspend was interrupted
Date: Fri, 22 Jan 2010 01:16:07 -0500 [thread overview]
Message-ID: <4B5942A7.1050902@redhat.com> (raw)
In-Reply-To: <4B581C6E.80503@ct.jp.nec.com>
Hi Ueda-san,
Kiyoshi Ueda wrote:
> On 01/21/2010 07:58 AM +0900, Takahiro Yasui wrote:
>> Kiyoshi Ueda wrote:
>>> On 01/20/2010 05:40 AM +0900, Takahiro Yasui wrote:
>>>> Introduce a target handler, cancel_presuspend, to cancel status changes
>>>> done by a target specific presuspend handler.
>>> How about using ->resume as a cancelling method?
>>> Though you have to audit existing targets' ->resume handler,
>>> I think it's better idea than adding another target handler
>>> just for this purpose.
> <snip>
>> I'm afraid that we need to modify each target's resume handler so that
>> they work properly even after processing presuspend handler but before
>> postsuspend handler.
>>
>> Please let me know if there is some oversight.
>
> There is no oversight.
> Perhaps I should have said 'audit (and modify if necessary)'.
>
> If auditing and modifying all targets are difficult, I don't object
> your approach which adds ->cancel_presuspend.
> But ->cancel_presuspend should be a subset of ->resume and it should
> make some code duplication. If ->resume can always restore target state
> correctly, it may avoid such duplication.
>
> Althrough I'm not sure the following idea is really reasonable,
> I think it should be worth to consider about it:
> When ->postsuspend is called and the device is really suspended,
> DMF_SUSPENDED flag is set in md->flags.
> So targets' ->resume handler can use it to check ->postsuspend
> had been called or not.
Hmm. It looks good idea.
By exporting dm_suspended(), targets running in kernel space, can get
the current status and choose actions to cancel state changes done
in presuspend(). One execption is dm-log-userspace. It calls user space
functions. So other solution is needed.
I will try to update this patch set according to your suggestions.
Thanks,
Taka
prev parent reply other threads:[~2010-01-22 6:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=4B5942A7.1050902@redhat.com \
--to=tyasui@redhat.com \
--cc=dm-devel@redhat.com \
--cc=k-ueda@ct.jp.nec.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.