From 998b3a1e5a2dd23bf89a853e15fabdaa8d788a72 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 1 Feb 2019 20:29:28 +0100 Subject: block: Purify .bdrv_refresh_filename() Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all BlockDriver.bdrv_refresh_filename() implementations. This also means that we can drop all of the existing default code for this from the global bdrv_refresh_filename() itself. Furthermore, we now have to call BlockDriver.bdrv_refresh_filename() after having set BDS.full_open_options, because the block driver's implementation should now be allowed to depend on BDS.full_open_options being set correctly. Finally, with this patch we can drop the @options parameter from BlockDriver.bdrv_refresh_filename(); also, add a comment on this function's purpose in block/block_int.h while touching its interface. This completely obsoletes blklogwrite's implementation of .bdrv_refresh_filename(). Signed-off-by: Max Reitz Message-id: 20190201192935.18394-25-mreitz@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/228 | 4 ---- tests/qemu-iotests/228.out | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228 index 7a57c41e29..9a50afd205 100755 --- a/tests/qemu-iotests/228 +++ b/tests/qemu-iotests/228 @@ -230,10 +230,6 @@ with iotests.FilePath('base.img') as base_img_path, \ overlay='node0') # This should give us the original plain result - # FIXME: Currently, it yields a json:{} filename even though it - # only contains a @driver and a @file entry, so a plain - # filename would obviously suffice. This is fixed by a - # future patch. log_node_info(vm.node_info('node0')) diff --git a/tests/qemu-iotests/228.out b/tests/qemu-iotests/228.out index 393ab09164..4217df24fe 100644 --- a/tests/qemu-iotests/228.out +++ b/tests/qemu-iotests/228.out @@ -74,7 +74,7 @@ bs->backing: (none) {"execute": "blockdev-snapshot", "arguments": {"node": "original-backing", "overlay": "node0"}} {"return": {}} -bs->filename: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}} +bs->filename: TEST_DIR/PID-top.img bs->backing_file: TEST_DIR/PID-base.img bs->backing->bs->filename: TEST_DIR/PID-base.img -- cgit v1.2.3