]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: Eliminate BlockDriverState member device_name[]
authorMarkus Armbruster <armbru@redhat.com>
Tue, 7 Oct 2014 11:59:11 +0000 (13:59 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 20 Oct 2014 11:41:26 +0000 (13:41 +0200)
commitbfb197e0d998bea8741c65492b2b42f443729249
treec7b9a48dc7dd7790d678a7a13f5ba245931876ad
parentfea68bb6e9fa65c7cc6caa6adda810d1d0fdbde4
block: Eliminate BlockDriverState member device_name[]

device_name[] can become non-empty only in bdrv_new_root() and
bdrv_move_feature_fields().  The latter is used only to undo damage
done by bdrv_swap().  The former is called only by blk_new_with_bs().
Therefore, when a BlockDriverState's device_name[] is non-empty, then
it's been created with a BlockBackend, and vice versa.  Furthermore,
blk_new_with_bs() keeps the two names equal.

Therefore, device_name[] is redundant.  Eliminate it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
16 files changed:
block-migration.c
block.c
block/mirror.c
block/qapi.c
block/qcow.c
block/qcow2.c
block/qed.c
block/quorum.c
block/vdi.c
block/vhdx.c
block/vmdk.c
block/vpc.c
block/vvfat.c
blockjob.c
include/block/block.h
include/block/block_int.h