From patchwork Mon Feb 9 18:38:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 438043 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DA0E8140172 for ; Tue, 10 Feb 2015 05:48:52 +1100 (AEDT) Received: from localhost ([::1]:34571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKtO6-0005VA-RH for incoming@patchwork.ozlabs.org; Mon, 09 Feb 2015 13:48:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKtEY-00048a-Qa for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKtEX-0005Vx-VE for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKtEX-0005VB-Mx for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:57 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t19IcvVA027451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 9 Feb 2015 13:38:57 -0500 Received: from localhost ([10.18.17.71]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t19IcuC4029485 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 9 Feb 2015 13:38:56 -0500 From: Max Reitz To: qemu-devel@nongnu.org Date: Mon, 9 Feb 2015 13:38:32 -0500 Message-Id: <1423507124-29809-11-git-send-email-mreitz@redhat.com> In-Reply-To: <1423507124-29809-1-git-send-email-mreitz@redhat.com> References: <1423507124-29809-1-git-send-email-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Paolo Bonzini , Stefan Hajnoczi , Max Reitz Subject: [Qemu-devel] [PATCH v2 10/22] block: Make bdrv_close() static X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org There are no users of bdrv_close() left, except for one of bdrv_open()'s failure paths, bdrv_close_all() and bdrv_delete(), and that is good. Make bdrv_close() static so nobody makes the mistake of directly using bdrv_close() again. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block.c | 4 +++- include/block/block.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 143c7cc..1590cb3 100644 --- a/block.c +++ b/block.c @@ -107,6 +107,8 @@ static int use_bdrv_whitelist; static NotifierList close_all_notifiers = NOTIFIER_LIST_INITIALIZER(close_all_notifiers); +static void bdrv_close(BlockDriverState *bs); + #ifdef _WIN32 static int is_windows_drive_prefix(const char *filename) { @@ -1851,7 +1853,7 @@ void bdrv_reopen_abort(BDRVReopenState *reopen_state) } -void bdrv_close(BlockDriverState *bs) +static void bdrv_close(BlockDriverState *bs) { BdrvAioNotifier *ban, *ban_next; diff --git a/include/block/block.h b/include/block/block.h index 79efccb..8274dbd 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -195,7 +195,6 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue, Error **errp); void bdrv_reopen_commit(BDRVReopenState *reopen_state); void bdrv_reopen_abort(BDRVReopenState *reopen_state); -void bdrv_close(BlockDriverState *bs); int bdrv_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors); int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,