]> git.proxmox.com Git - mirror_qemu.git/commit - block/nbd.c
block: Purify .bdrv_refresh_filename()
authorMax Reitz <mreitz@redhat.com>
Fri, 1 Feb 2019 19:29:28 +0000 (20:29 +0100)
committerMax Reitz <mreitz@redhat.com>
Mon, 25 Feb 2019 14:11:27 +0000 (15:11 +0100)
commit998b3a1e5a2dd23bf89a853e15fabdaa8d788a72
tree83d85dcf5d9a9ad80c2fe752bb21c6436ce0fe87
parent97e2f021f844383d85de526ce88667ca34ecd277
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 <mreitz@redhat.com>
Message-id: 20190201192935.18394-25-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
14 files changed:
block.c
block/blkdebug.c
block/blklogwrites.c
block/blkverify.c
block/commit.c
block/mirror.c
block/nbd.c
block/nfs.c
block/null.c
block/nvme.c
block/quorum.c
include/block/block_int.h
tests/qemu-iotests/228
tests/qemu-iotests/228.out