From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyyLk-0006lc-2v for qemu-devel@nongnu.org; Mon, 23 Jun 2014 03:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyyLb-0005bg-C6 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 03:07:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyyLb-0005bP-2S for qemu-devel@nongnu.org; Mon, 23 Jun 2014 03:07:23 -0400 Date: Mon, 23 Jun 2014 15:07:35 +0800 From: Fam Zheng Message-ID: <20140623070735.GA26055@T430.redhat.com> References: <20140619202043.GA18306@irqsave.net> <20140620050106.GB15938@T430.redhat.com> <53A453AF.3@redhat.com> <20140621085358.GA11607@T430.redhat.com> <20140621104551.GA986@irqsave.net> <20140621151519.GA14173@T430> <20140621153911.GB2108@irqsave.net> <20140621154028.GC2108@irqsave.net> <20140623043230.GB5977@T430.nay.redhat.com> <20140623051731.GA21371@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140623051731.GA21371@irqsave.net> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] block: Make op blocker recursive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, 06/23 07:17, Beno=EEt Canet wrote: > The Monday 23 Jun 2014 =E0 12:32:30 (+0800), Fam Zheng wrote : > > On Sat, 06/21 17:40, Beno=EEt Canet wrote: > > > The Saturday 21 Jun 2014 =E0 17:39:11 (+0200), Beno=EEt Canet wrote= : > > > > We still have the issue of unlocking the bottom BDS when a subtre= e is detached > > > > from the graphs by a swap. (It does happen in my drive-mirror arb= itrary node > > > > replacement series). > > > >=20 > > > > From my understanding the unlocking of the root BDS is done by dr= ive_mirror_complete > > > > while the mirror code tries to unref the orphaned subtree _before= _ drive_mirror_complete > > > > is called. > > >=20 > > > One fixe to my sentence: > > > s/drive_mirror_complete/block_job_complete/ > > >=20 > > >=20 > > > >=20 > > > > So the bottom BDS would be unrefed before being unlocked. > >=20 > > I don't see a problem with that, we can do the unlock before unref th= e node if > > we want. >=20 > My concern is that mirror.c does the unref and don't own the Blocker by= itself. > The blocker is owned by the blockjob so it's difficult for mirror.c to = do the unblock. For example, drive-backup doesn't change the chain, so this (chain manipulation) blocker should be hold by mirror.c, not by blockjob.c. Fam