[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v5 08/13] block: Make bdrv_close() static
From: |
Max Reitz |
Subject: |
[Qemu-block] [PATCH v5 08/13] block: Make bdrv_close() static |
Date: |
Tue, 3 Mar 2015 15:13:06 -0500 |
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block.c | 4 +++-
include/block/block.h | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 5e2fde3..e84fa0c 100644
--- a/block.c
+++ b/block.c
@@ -104,6 +104,8 @@ static void bdrv_reset_dirty(BlockDriverState *bs, int64_t
cur_sector,
/* If non-zero, use only whitelisted block drivers */
static int use_bdrv_whitelist;
+static void bdrv_close(BlockDriverState *bs);
+
#ifdef _WIN32
static int is_windows_drive_prefix(const char *filename)
{
@@ -1882,7 +1884,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 3c0da3f..a755cfa 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -206,7 +206,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,
--
2.1.0
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 02/13] iotests: Make redirecting qemu's stderr optional, (continued)
- [Qemu-block] [PATCH v5 06/13] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 07/13] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 01/13] iotests: Move _filter_nbd into common.filter, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 03/13] iotests: Add test for eject under NBD server, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 05/13] block: Move BDS close notifiers into BB, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 08/13] block: Make bdrv_close() static,
Max Reitz <=
- [Qemu-block] [PATCH v5 04/13] quorum: Fix close path, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 13/13] iotests: Add test for multiple BB on BDS tree, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 10/13] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 11/13] block: Add blk_remove_all_bs(), Max Reitz, 2015/03/03
- [Qemu-block] [PATCH v5 09/13] block: Add list of all BlockDriverStates, Max Reitz, 2015/03/03