[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 25/50] block: Make bdrv_close() static
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PULL v2 25/50] block: Make bdrv_close() static |
Date: |
Tue, 2 Feb 2016 18:35:18 +0100 |
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>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <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 f4312d9..e076f10 100644
--- a/block.c
+++ b/block.c
@@ -93,6 +93,8 @@ static void bdrv_release_named_dirty_bitmaps(BlockDriverState
*bs);
/* 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)
{
@@ -2134,7 +2136,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 c7345de..4452b79 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -225,7 +225,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.7.0
- [Qemu-devel] [PULL v2 15/50] block: Remove unused struct definition BlockFinishData, (continued)
- [Qemu-devel] [PULL v2 15/50] block: Remove unused struct definition BlockFinishData, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 18/50] block: Add BB-BDS remove/insert notifiers, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 17/50] iotests: Add test for eject under NBD server, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 21/50] nbd: Switch from close to eject notifier, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 19/50] virtio-blk: Functions for op blocker management, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 20/50] virtio-scsi: Catch BDS-BB removal/insertion, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 24/50] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 22/50] block: Remove BDS close notifier, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 23/50] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 26/50] block: Add list of all BlockDriverStates, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 25/50] block: Make bdrv_close() static,
Max Reitz <=
- [Qemu-devel] [PULL v2 29/50] block: Rewrite bdrv_close_all(), Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 28/50] block: Add blk_remove_all_bs(), Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 27/50] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 30/50] iotests: Add test for multiple BB on BDS tree, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 32/50] block: acquire in bdrv_query_image_info, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 31/50] iotests: Add test for block jobs and BDS ejection, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 34/50] qcow: Assign bs->file->bs to file in qcow_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 35/50] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 33/50] block: Add "file" output parameter to block status query functions, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 36/50] raw: Assign bs to file in raw_co_get_block_status, Max Reitz, 2016/02/02