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 <mre...@redhat.com>
---
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