From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP926-0001tf-1Z for qemu-devel@nongnu.org; Fri, 19 Oct 2012 05:38:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TP922-0004ab-5z for qemu-devel@nongnu.org; Fri, 19 Oct 2012 05:38:21 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:44268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP921-0004Yt-Sv for qemu-devel@nongnu.org; Fri, 19 Oct 2012 05:38:18 -0400 Date: Fri, 19 Oct 2012 05:38:11 -0400 (EDT) From: Paolo Bonzini Message-ID: <2050397282.13371346.1350639491003.JavaMail.root@redhat.com> In-Reply-To: <87vce6kh36.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 23/25] block: add close notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com > > @@ -1098,12 +1106,13 @@ void bdrv_reopen_abort(BDRVReopenState *reopen_state) > > void bdrv_close(BlockDriverState *bs) > > { > > bdrv_flush(bs); > > - if (bs->drv) { > > - if (bs->job) { > > - block_job_cancel_sync(bs->job); > > - } > > - bdrv_drain_all(); > > + if (bs->job) { > > + block_job_cancel_sync(bs->job); > > + } > > + bdrv_drain_all(); > > Dropping the bs->drv condition in a separate commit gives you a nice > place to explain why it's fine: the commit message. I figure it is, > but it's not 100% obvious. Will do, thanks. Paolo