From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Anderson Subject: Re: Re: dm: bind new table before destroying old Date: Wed, 11 Nov 2009 23:00:15 -0800 Message-ID: <20091112070015.GA29091@linux.vnet.ibm.com> References: <20091111011652.GK17055@agk-dp.fab.redhat.com> <4AFA6005.9060501@ct.jp.nec.com> <20091111151110.GO17055@agk-dp.fab.redhat.com> <4AFAD4F3.8070505@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4AFAD4F3.8070505@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: Kiyoshi Ueda , Mike Snitzer , Heinz Mauelshagen , Mikulas Patocka , Zdenek Kabelac , Jun'ichi Nomura List-Id: dm-devel.ids Milan Broz 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