From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZMdL-0003OH-IP for qemu-devel@nongnu.org; Wed, 01 Oct 2014 12:20:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZMdF-0002mz-0r for qemu-devel@nongnu.org; Wed, 01 Oct 2014 12:20:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZMdE-0002mj-P0 for qemu-devel@nongnu.org; Wed, 01 Oct 2014 12:20:00 -0400 Message-ID: <542C29A9.1080504@redhat.com> Date: Wed, 01 Oct 2014 18:19:53 +0200 From: Max Reitz MIME-Version: 1.0 References: <1412105144-532-1-git-send-email-armbru@redhat.com> <1412105144-532-9-git-send-email-armbru@redhat.com> In-Reply-To: <1412105144-532-9-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 08/23] block: Eliminate BlockDriverState member device_name[] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com 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 > --- > 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