All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@linux.vnet.ibm.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>,
	Mike Snitzer <snitzer@redhat.com>,
	Heinz Mauelshagen <mauelshagen@redhat.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Zdenek Kabelac <zkabelac@redhat.com>,
	Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Subject: Re: Re: dm: bind new table before destroying old
Date: Wed, 11 Nov 2009 23:00:15 -0800	[thread overview]
Message-ID: <20091112070015.GA29091@linux.vnet.ibm.com> (raw)
In-Reply-To: <4AFAD4F3.8070505@redhat.com>

Milan Broz <mbroz@redhat.com> wrote:
> On 11/11/2009 04:11 PM, Alasdair G Kergon wrote:
> > On Wed, Nov 11, 2009 at 03:56:05PM +0900, Kiyoshi Ueda wrote:
> >> I believe dm-mpath needs to flush such workqueues in postsuspend.
> > 
> > Yes - should be an easy change.
> 
> similar problem is probably in crypt target, I'll check it later.
> 
> >> Also, we need something to block message ioctl to suspended device.
> >  
> >> As for the message ioctl, I don't have any good idea, but...
> >>   - Reject message ioctl to suspended device in dm-ioctl
> > 
> > I think the crypt target expects to be able to do this to manipulate
> > the in-core encryption key.
> 
> yes, crypt target must be able to process messages when in suspended state.
> 

I hit a issue like Kiyoshi described of the target_message
(multipath_message) generating new work while dev_remove is trying
complete in parallel with calling fail_path / reinstate_path.

I added two accessor functions to dm-table.c (dm_table_md_suspended and
dm_table_md_freeing). I am calling both functions from multipath_message
to return early if we are in one of these states. Depending on the usage
model of the other targets message functions dm_table_md_freeing (or a new
function dm_table_md_deleting) could be called in target_message instead
of each targets message function.

The test runs using a mutex and the alternate option of using spin_lock
are currently passing I will post tomorrow the series for comments.

I also tested suspend / resume in parallel with calling fail_path /
reinstate_path. 

-andmike
--
Michael Anderson
andmike@linux.vnet.ibm.com

  reply	other threads:[~2009-11-12  7:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11  1:16 dm: bind new table before destroying old Alasdair G Kergon
2009-11-11  1:20 ` Alasdair G Kergon
2009-11-11  2:48   ` dm: keep old table until after resume succeeded Alasdair G Kergon
2009-11-11  6:56 ` dm: bind new table before destroying old Kiyoshi Ueda
2009-11-11 15:11   ` Alasdair G Kergon
2009-11-11 15:14     ` Milan Broz
2009-11-12  7:00       ` Mike Anderson [this message]
2009-11-12  9:59     ` Kiyoshi Ueda
2009-11-11 13:20 ` Mike Snitzer
2009-11-11 23:45   ` Mike Snitzer
2009-11-19  0:50     ` Alasdair G Kergon
2009-11-19  2:51       ` malahal
2009-11-19 12:49         ` Mikulas Patocka

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=20091112070015.GA29091@linux.vnet.ibm.com \
    --to=andmike@linux.vnet.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=mauelshagen@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@redhat.com \
    --cc=zkabelac@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.