include/system/block-backend-global-state.h | 1 - block/block-backend.c | 12 ------------ 2 files changed, 13 deletions(-)
Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove
the now unused function.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/system/block-backend-global-state.h | 1 -
block/block-backend.c | 12 ------------
2 files changed, 13 deletions(-)
diff --git a/include/system/block-backend-global-state.h b/include/system/block-backend-global-state.h
index 9cc9b008ec..35b5e8380b 100644
--- a/include/system/block-backend-global-state.h
+++ b/include/system/block-backend-global-state.h
@@ -86,7 +86,6 @@ bool blk_supports_write_perm(BlockBackend *blk);
bool blk_is_sg(BlockBackend *blk);
void blk_set_enable_write_cache(BlockBackend *blk, bool wce);
int blk_get_flags(BlockBackend *blk);
-bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);
int blk_set_aio_context(BlockBackend *blk, AioContext *new_context,
Error **errp);
void blk_add_aio_context_notifier(BlockBackend *blk,
diff --git a/block/block-backend.c b/block/block-backend.c
index 9288f7e1c6..a402db13f2 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2357,18 +2357,6 @@ void *blk_blockalign(BlockBackend *blk, size_t size)
return qemu_blockalign(blk ? blk_bs(blk) : NULL, size);
}
-bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp)
-{
- BlockDriverState *bs = blk_bs(blk);
- GLOBAL_STATE_CODE();
- GRAPH_RDLOCK_GUARD_MAINLOOP();
-
- if (!bs) {
- return false;
- }
-
- return bdrv_op_is_blocked(bs, op, errp);
-}
/**
* Return BB's current AioContext. Note that this context may change
--
2.48.1
On Thu, Feb 06, 2025 at 05:53:31PM +0100, Kevin Wolf wrote: > Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove > the now unused function. > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > --- > include/system/block-backend-global-state.h | 1 - > block/block-backend.c | 12 ------------ > 2 files changed, 13 deletions(-) Nice! This can be merged after my patch that removes BLOCK_OP_TYPE_DATAPLANE. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
On 6/2/25 17:53, Kevin Wolf wrote:
> Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove
> the now unused function.
fatal: ambiguous argument 'fc4e394b28': unknown revision or path not in
the working tree.
Is there a patch on the list?
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> include/system/block-backend-global-state.h | 1 -
> block/block-backend.c | 12 ------------
> 2 files changed, 13 deletions(-)
>
> diff --git a/include/system/block-backend-global-state.h b/include/system/block-backend-global-state.h
> index 9cc9b008ec..35b5e8380b 100644
> --- a/include/system/block-backend-global-state.h
> +++ b/include/system/block-backend-global-state.h
> @@ -86,7 +86,6 @@ bool blk_supports_write_perm(BlockBackend *blk);
> bool blk_is_sg(BlockBackend *blk);
> void blk_set_enable_write_cache(BlockBackend *blk, bool wce);
> int blk_get_flags(BlockBackend *blk);
> -bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);
> int blk_set_aio_context(BlockBackend *blk, AioContext *new_context,
> Error **errp);
> void blk_add_aio_context_notifier(BlockBackend *blk,
> diff --git a/block/block-backend.c b/block/block-backend.c
> index 9288f7e1c6..a402db13f2 100644
> --- a/block/block-backend.c
> +++ b/block/block-backend.c
> @@ -2357,18 +2357,6 @@ void *blk_blockalign(BlockBackend *blk, size_t size)
> return qemu_blockalign(blk ? blk_bs(blk) : NULL, size);
> }
>
> -bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp)
> -{
> - BlockDriverState *bs = blk_bs(blk);
> - GLOBAL_STATE_CODE();
> - GRAPH_RDLOCK_GUARD_MAINLOOP();
> -
> - if (!bs) {
> - return false;
> - }
> -
> - return bdrv_op_is_blocked(bs, op, errp);
> -}
>
> /**
> * Return BB's current AioContext. Note that this context may change
Am 06.02.2025 um 18:25 hat Philippe Mathieu-Daudé geschrieben: > On 6/2/25 17:53, Kevin Wolf wrote: > > Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove > > the now unused function. > > fatal: ambiguous argument 'fc4e394b28': unknown revision or path not in the > working tree. > > Is there a patch on the list? It's in my pending pull request (which I hope to go through - otherwise I'll have to update the commit ID here). This is the patch: https://patchew.org/QEMU/20250203182529.269066-1-stefanha@redhat.com/ Kevin
On 6/2/25 21:44, Kevin Wolf wrote: > Am 06.02.2025 um 18:25 hat Philippe Mathieu-Daudé geschrieben: >> On 6/2/25 17:53, Kevin Wolf wrote: >>> Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove >>> the now unused function. >> >> fatal: ambiguous argument 'fc4e394b28': unknown revision or path not in the >> working tree. >> >> Is there a patch on the list? > > It's in my pending pull request (which I hope to go through - otherwise > I'll have to update the commit ID here). This is the patch: > > https://patchew.org/QEMU/20250203182529.269066-1-stefanha@redhat.com/ OK! Then: Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
© 2016 - 2026 Red Hat, Inc.