From bfb197e0d998bea8741c65492b2b42f443729249 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Oct 2014 13:59:11 +0200 Subject: 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 Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/quorum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/quorum.c') diff --git a/block/quorum.c b/block/quorum.c index 7687466..6ce5904 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -226,8 +226,8 @@ static void quorum_report_bad(QuorumAIOCB *acb, char *node_name, int ret) static void quorum_report_failure(QuorumAIOCB *acb) { - const char *reference = acb->common.bs->device_name[0] ? - acb->common.bs->device_name : + const char *reference = bdrv_get_device_name(acb->common.bs)[0] ? + bdrv_get_device_name(acb->common.bs) : acb->common.bs->node_name; qapi_event_send_quorum_failure(reference, acb->sector_num, -- cgit v1.1