From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6Xt1-00073R-Cb for qemu-devel@nongnu.org; Thu, 12 Apr 2018 04:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6Xt0-0002xO-Hg for qemu-devel@nongnu.org; Thu, 12 Apr 2018 04:47:19 -0400 References: <20180411163940.2523-1-kwolf@redhat.com> <20180411163940.2523-19-kwolf@redhat.com> From: Paolo Bonzini Message-ID: Date: Thu, 12 Apr 2018 10:47:05 +0200 MIME-Version: 1.0 In-Reply-To: <20180411163940.2523-19-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 18/19] block: Allow graph changes in bdrv_drain_all_begin/end sections List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: mreitz@redhat.com, famz@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org On 11/04/2018 18:39, Kevin Wolf wrote: > The much easier and more obviously correct way is to fundamentally > change the way the functions work: Iterate over all BlockDriverStates, > no matter who owns them, and drain them individually. Compensation is > only necessary when a new BDS is created inside a drain_all section. > Removal of a BDS doesn't require any action because it's gone afterwards > anyway. Ok, now I see (I think) why you chose the recursive check for in-flight requests. The higher quiesce_count is not a problem, but I am still not convinced about the recursion. Paolo > This change means that some nodes get a higher bs->quiesce_count now > because each node propagates its individual drain to all of its parents. > In the old subtree drain, propagation back to the parent that made the > recursive drain request was avoided. While this isn't perfectly > beautiful, accepting the higher counts seems preferable to adding drain > code to multiple other places that modify the graph.