From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGENu-00073r-26 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 17:13:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGENp-0002bt-KO for qemu-devel@nongnu.org; Tue, 27 Jan 2015 17:13:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGENp-0002bo-DJ for qemu-devel@nongnu.org; Tue, 27 Jan 2015 17:13:17 -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 t0RMDGdE015014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 27 Jan 2015 17:13:16 -0500 Message-ID: <54C80D7A.3010201@redhat.com> Date: Tue, 27 Jan 2015 17:13:14 -0500 From: Max Reitz MIME-Version: 1.0 References: <1422387983-32153-1-git-send-email-mreitz@redhat.com> <1422387983-32153-20-git-send-email-mreitz@redhat.com> <54C80A3F.6090308@redhat.com> In-Reply-To: <54C80A3F.6090308@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RESEND 19/50] blockdev: Use BlockBackend for blockdev-backup TA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Jeff Cody , Markus Armbruster , Stefan Hajnoczi , John Snow On 2015-01-27 at 16:59, Eric Blake wrote: > On 01/27/2015 12:45 PM, Max Reitz wrote: >> When preparing a blockdev-backup transaction, the BlockBackend should be >> used because there may be no medium associated to the BB (which would >> make bdrv_find() fail, whereas blk_by_name() does not). >> >> This does not make a real difference because blockdev-backup will fail >> without a medium anyway; however, it will have an impact on the error >> returned ("device not found" vs. "no medium"). >> >> Signed-off-by: Max Reitz >> --- >> blockdev.c | 17 ++++++++++------- >> 1 file changed, 10 insertions(+), 7 deletions(-) > And no tests changed output as a result? Might be worth adding a test > for the error message. Actually, it's preventing a test output change: At this point, a BB always has a BDS, thus there is no change (if blk_by_name() works, bdrv_find() will work, too). This will change only later (patches 34 and 40), at which point the message would change to "device not found" without this patch (and as far as I remember, qemu-iotest 055 tests the error type). Max