All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 0/2] Add suspended state check for target messages
Date: Fri, 13 Nov 2009 19:22:16 +0900	[thread overview]
Message-ID: <4AFD3358.7000007@ct.jp.nec.com> (raw)
In-Reply-To: <20091113080637.17587.64935.stgit@localhost.localdomain>

Hi Mike,

On 11/13/2009 05:06 PM +0900, Mike Anderson wrote:
> This patch adds a accessor function that allows determining if a
> mapped_device is in the suspended state and then adds this check to the
> multipath targets multipath_message function.
> 
> As previously described in the email at the archive url provided below the
> target_message ioctl can call into the target after suspend completes.
> This can cause new work to be queued and actions to be taken by the target
> that should be prevented in the suspended state.
> 
> http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/10486
> 
> ---
> 
> Mike Anderson (2):
>       dm: Add accessor dm_table_md_suspended
>       dm: Add suspended check to multipath_message

Thank you for the patch.
But this patch-set doesn't solve the race problem.

Multipath must start rejecting message ioctl *before* flushing
workqueues in postsuspend.
  (*) With my patch, all multipath works are flushed in postsuspend.
      http://patchwork.kernel.org/patch/59556/

However, your patch starts rejecting message ioctl *after* postsuspend.
So there is a small window below:
  dm_suspend()                        multipath_message()
  ------------------------------------------------------------------
  dm_table_post_suspend()
    -> flush_multipath_works()
                                      if (!test_bit(DMF_SUSPENDED))
                                          queue_work()
  set_bit(DMF_SUSPENDED)
  ...
  dm_swap_table()
                                      [de]activate_path()

Thanks,
Kiyoshi Ueda

  parent reply	other threads:[~2009-11-13 10:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  8:06 [PATCH 0/2] Add suspended state check for target messages Mike Anderson
2009-11-13  8:06 ` [PATCH 1/2] dm: Add accessor dm_table_md_suspended Mike Anderson
2009-11-13 14:19   ` Mike Snitzer
2009-11-13  8:06 ` [PATCH 2/2] dm: Add suspended check to multipath_message Mike Anderson
2009-11-13 18:35   ` malahal
2009-11-13 10:22 ` Kiyoshi Ueda [this message]
2009-11-13 14:19   ` [PATCH 0/2] Add suspended state check for target messages Alasdair G Kergon
2009-11-13 18:30     ` malahal
2009-11-13 18:47     ` Mike Anderson
2009-11-16  7:25     ` Kiyoshi Ueda
2009-11-16  7:43       ` Mike Anderson
2009-11-16 13:23       ` Alasdair G Kergon

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=4AFD3358.7000007@ct.jp.nec.com \
    --to=k-ueda@ct.jp.nec.com \
    --cc=dm-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.