[Qemu-devel] [PATCH 10/14] block: Drop bdrv_reopen()

Alberto Garcia posted 14 patches 7 years, 4 months ago
There is a newer version of this series
[Qemu-devel] [PATCH 10/14] block: Drop bdrv_reopen()
Posted by Alberto Garcia 7 years, 4 months ago
No one is using this function anymore, so we can safely remove it

Signed-off-by: Alberto Garcia <berto@igalia.com>
---
 block.c               | 21 ---------------------
 include/block/block.h |  1 -
 2 files changed, 22 deletions(-)

diff --git a/block.c b/block.c
index ac945b4bc8..3751167434 100644
--- a/block.c
+++ b/block.c
@@ -3085,27 +3085,6 @@ cleanup:
     return ret;
 }
 
-
-/* Reopen a single BlockDriverState with the specified flags. */
-int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp)
-{
-    int ret = -1;
-    Error *local_err = NULL;
-    BlockReopenQueue *queue;
-
-    bdrv_subtree_drained_begin(bs);
-
-    queue = bdrv_reopen_queue(NULL, bs, NULL, bdrv_flags);
-    ret = bdrv_reopen_multiple(bdrv_get_aio_context(bs), queue, &local_err);
-    if (local_err != NULL) {
-        error_propagate(errp, local_err);
-    }
-
-    bdrv_subtree_drained_end(bs);
-
-    return ret;
-}
-
 int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only,
                               Error **errp)
 {
diff --git a/include/block/block.h b/include/block/block.h
index 47ee32512f..1650b1ac14 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -301,7 +301,6 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
                                     BlockDriverState *bs,
                                     QDict *options, int flags);
 int bdrv_reopen_multiple(AioContext *ctx, BlockReopenQueue *bs_queue, Error **errp);
-int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp);
 int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only,
                               Error **errp);
 int bdrv_reopen_prepare(BDRVReopenState *reopen_state,
-- 
2.11.0


Re: [Qemu-devel] [PATCH 10/14] block: Drop bdrv_reopen()
Posted by Max Reitz 7 years, 4 months ago
On 19.09.18 16:47, Alberto Garcia wrote:
> No one is using this function anymore, so we can safely remove it

Is this such a minor action to you that you think it doesn't need a full
stop? ;-)

> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  block.c               | 21 ---------------------
>  include/block/block.h |  1 -
>  2 files changed, 22 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>