Received: from eggs.gnu.org ([2001:4830:134:3::10]:33415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5X2G-0004yX-A1 for qemu-devel@nongnu.org; Wed, 25 May 2016 07:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5X2F-0002Fg-FJ for qemu-devel@nongnu.org; Wed, 25 May 2016 07:31:36 -0400 From: Alberto Garcia In-Reply-To: <1464097654-12977-3-git-send-email-kwolf@redhat.com> References: <1464097654-12977-1-git-send-email-kwolf@redhat.com> <1464097654-12977-3-git-send-email-kwolf@redhat.com> Date: Wed, 25 May 2016 13:31:23 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 02/14] block: Cancel jobs first in bdrv_close_all() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: mreitz@redhat.com, jcody@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org On Tue 24 May 2016 03:47:22 PM CEST, Kevin Wolf wrote: > So far, bdrv_close_all() first removed all root BlockDriverStates of > BlockBackends and monitor owned BDSes, and then assumed that the > remaining BDSes must be related to jobs and cancelled these jobs. > > This order doesn't work that well any more when block jobs use > BlockBackends internally because then they will lose their BDS before > being cancelled. > > This patch changes bdrv_close_all() to first cancel all jobs and then > remove all root BDSes from the remaining BBs. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto