qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 08/23] block: Eliminate BlockDriverState memb


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v4 08/23] block: Eliminate BlockDriverState member device_name[]
Date: Wed, 01 Oct 2014 18:19:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 30.09.2014 21:25, Markus Armbruster wrote:
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 <address@hidden>
---
  block-migration.c         | 12 +++++++-----
  block.c                   | 49 ++++++++++++++++++++++++++---------------------
  block/mirror.c            |  3 ++-
  block/qapi.c              |  6 +++---
  block/qcow.c              |  4 ++--
  block/qcow2.c             |  4 ++--
  block/qed.c               |  2 +-
  block/quorum.c            |  4 ++--
  block/vdi.c               |  2 +-
  block/vhdx.c              |  2 +-
  block/vmdk.c              |  4 ++--
  block/vpc.c               |  2 +-
  block/vvfat.c             |  2 +-
  blockjob.c                |  3 ++-
  include/block/block.h     |  2 +-
  include/block/block_int.h |  2 --
  16 files changed, 55 insertions(+), 48 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]