From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVRbE-0006u1-Hj for qemu-devel@nongnu.org; Sat, 20 Sep 2014 16:49:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVRb8-00010M-E3 for qemu-devel@nongnu.org; Sat, 20 Sep 2014 16:49:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVRb8-000104-6d for qemu-devel@nongnu.org; Sat, 20 Sep 2014 16:49:38 -0400 Message-ID: <541DE854.6040500@redhat.com> Date: Sat, 20 Sep 2014 22:49:24 +0200 From: Max Reitz MIME-Version: 1.0 References: <1410891148-28849-1-git-send-email-armbru@redhat.com> <1410891148-28849-9-git-send-email-armbru@redhat.com> In-Reply-To: <1410891148-28849-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 v3 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, famz@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com On 16.09.2014 20:12, 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 | 70 ++++++++++++++++++++--------------------------- > block/block-backend.c | 14 ++++++---- > block/cow.c | 2 +- > 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 | 4 +-- > include/block/block_int.h | 2 -- > 18 files changed, 67 insertions(+), 75 deletions(-) Reviewed-by: Max Reitz