From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tDN-0005Qm-Eu for qemu-devel@nongnu.org; Fri, 19 Dec 2014 03:47:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1tDH-0002Dt-A7 for qemu-devel@nongnu.org; Fri, 19 Dec 2014 03:47:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tDH-0002Dl-25 for qemu-devel@nongnu.org; Fri, 19 Dec 2014 03:47:07 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBJ8l6Oe022959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 19 Dec 2014 03:47:06 -0500 From: Markus Armbruster References: <1417660192-3773-1-git-send-email-famz@redhat.com> <1417660192-3773-2-git-send-email-famz@redhat.com> <54806518.4040301@redhat.com> Date: Fri, 19 Dec 2014 09:47:03 +0100 In-Reply-To: <54806518.4040301@redhat.com> (Max Reitz's message of "Thu, 04 Dec 2014 14:43:52 +0100") Message-ID: <87fvcc9gc8.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 1/3] qmp: Add command 'blockdev-backup' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi Max Reitz writes: > On 2014-12-04 at 03:29, Fam Zheng wrote: >> Similar to drive-backup, but this command uses a device id as target >> instead of creating/opening an image file. >> >> Also add blocker on target bs, since the target is also a named device >> now. >> >> Add check and report error for bs == target which became possible but is >> an illegal case with introduction of blockdev-backup. [...] >> diff --git a/blockdev.c b/blockdev.c >> index 5651a8e..f44441a 100644 >> --- a/blockdev.c >> +++ b/blockdev.c [...] >> + if (!bs) { >> + error_set(errp, QERR_DEVICE_NOT_FOUND, device); >> + return; >> + } >> + >> + target_bs = bdrv_find(target); >> + if (!target_bs) { >> + error_set(errp, QERR_DEVICE_NOT_FOUND, target); >> + return; >> + } >> + >> + bdrv_ref(target_bs); >> + bdrv_set_aio_context(target_bs, bdrv_get_aio_context(bs)); > > In the cover letter you said you were acquiring the AIO context but > you're not. Something like the aio_context_acquire() call in > qmp_drive_backup() seems missing. The fact that I missed this in my review demonstrates that I have to pay much more attention to AIO contexts. Thanks, Max!