[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 18/24] block: Make bdrv_close() static
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v7 18/24] block: Make bdrv_close() static |
Date: |
Thu, 12 Nov 2015 15:07:32 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, 11/09 23:39, Max Reitz wrote:
> 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>
> ---
> block.c | 4 +++-
> include/block/block.h | 1 -
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/block.c b/block.c
> index 4ee3b01..b5874aa 100644
> --- a/block.c
> +++ b/block.c
> @@ -92,6 +92,8 @@ static void bdrv_release_all_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)
> {
> @@ -1894,7 +1896,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 8d9a049..03551d3 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -222,7 +222,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.6.2
>
>
Reviewed-by: Fam Zheng <address@hidden>
- Re: [Qemu-devel] [PATCH v7 10/24] iotests: Add test for eject under NBD server, (continued)
- [Qemu-devel] [PATCH v7 11/24] block: Add BB-BDS remove/insert notifiers, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 13/24] virtio-scsi: Catch BDS-BB removal/insertion, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 14/24] nbd: Switch from close to eject notifier, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 15/24] block: Remove BDS close notifier, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 16/24] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 17/24] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 18/24] block: Make bdrv_close() static, Max Reitz, 2015/11/09
- Re: [Qemu-devel] [PATCH v7 18/24] block: Make bdrv_close() static,
Fam Zheng <=
- [Qemu-devel] [PATCH v7 19/24] block: Add list of all BlockDriverStates, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 20/24] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 21/24] block: Add blk_remove_all_bs(), Max Reitz, 2015/11/09
- [Qemu-devel] [PATCH v7 22/24] block: Rewrite bdrv_close_all(), Max Reitz, 2015/11/09