From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0JJE-0006Ve-1t for qemu-devel@nongnu.org; Tue, 10 May 2016 21:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0JJB-00032v-Qf for qemu-devel@nongnu.org; Tue, 10 May 2016 21:51:30 -0400 Date: Wed, 11 May 2016 09:51:24 +0800 From: Fam Zheng Message-ID: <20160511015124.GD13488@ad.usersys.redhat.com> References: <1461030177-29144-1-git-send-email-famz@redhat.com> <1461030177-29144-3-git-send-email-famz@redhat.com> <20160504101242.GC14972@noname.str.redhat.com> <20160505003224.GA13202@ad.usersys.redhat.com> <20160506074907.GA5093@noname.redhat.com> <20160510032302.GC1207@ad.usersys.redhat.com> <20160510083331.GB4921@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160510083331.GB4921@noname.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] block: Inactivate all children List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, Max Reitz , qemu-block@nongnu.org On Tue, 05/10 10:33, Kevin Wolf wrote: > > Fair enough. My series didn't have a separate callback, but with yours > that should be working. > > So is the semantics of .bdrv_inactivate() basically "bdrv_flush, and I > really mean it"? Yes. > > > > Maybe we need something like an "active reference counter", and we > > > decrement that for all children and only call their .bdrv_inactivate() > > > when it arrives at 0. > > > > That should work, but the effect of the counters are local to one invocation of > > bdrv_inactivate_all(), and is not really necessary if we do as above. > > Agreed. Working on another version now. Fam