From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5724-0001hL-K7 for qemu-devel@nongnu.org; Tue, 24 May 2016 03:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5722-0001jG-R4 for qemu-devel@nongnu.org; Tue, 24 May 2016 03:45:39 -0400 Date: Tue, 24 May 2016 09:45:29 +0200 From: Kevin Wolf Message-ID: <20160524074529.GC7091@noname.redhat.com> References: <1463621147-12285-1-git-send-email-famz@redhat.com> <1463621147-12285-2-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463621147-12285-2-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/2] backup: Fail early if cannot determine cluster size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, Jeff Cody , Max Reitz , qemu-block@nongnu.org, jsnow@redhat.com, qemu-stable@nongnu.org, eblake@redhat.com Am 19.05.2016 um 03:25 hat Fam Zheng geschrieben: > Otherwise the job is orphaned and block_job_cancel_sync in > bdrv_close_all() when quitting will trigger assertion failure. > > Cc: qemu-stable@nongnu.org > Reviewed-by: John Snow > Reviewed-by: Jeff Cody > Signed-off-by: Fam Zheng Instead of moving the code around, wouldn't it have been easier to just add the missing block_job_unref() call? That would also seem safer with respect to future changes in the code that might reintroduce new error conditions after block_job_create() and resurrect this bug. That said, the patch looks correct, so if you don't want to change it: Reviewed-by: Kevin Wolf