* [PATCH] block: Remove unused blk_op_is_blocked()
@ 2025-02-06 16:53 Kevin Wolf
2025-02-06 17:25 ` Philippe Mathieu-Daudé
2025-02-06 18:11 ` Stefan Hajnoczi
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Wolf @ 2025-02-06 16:53 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, stefanha, qemu-devel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] block: Remove unused blk_op_is_blocked()
2025-02-06 16:53 [PATCH] block: Remove unused blk_op_is_blocked() Kevin Wolf
@ 2025-02-06 17:25 ` Philippe Mathieu-Daudé
2025-02-06 20:44 ` Kevin Wolf
2025-02-06 18:11 ` Stefan Hajnoczi
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-06 17:25 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: stefanha, qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block: Remove unused blk_op_is_blocked()
2025-02-06 16:53 [PATCH] block: Remove unused blk_op_is_blocked() Kevin Wolf
2025-02-06 17:25 ` Philippe Mathieu-Daudé
@ 2025-02-06 18:11 ` Stefan Hajnoczi
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2025-02-06 18:11 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-block, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
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>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block: Remove unused blk_op_is_blocked()
2025-02-06 17:25 ` Philippe Mathieu-Daudé
@ 2025-02-06 20:44 ` Kevin Wolf
2025-02-10 11:44 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2025-02-06 20:44 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-block, stefanha, qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block: Remove unused blk_op_is_blocked()
2025-02-06 20:44 ` Kevin Wolf
@ 2025-02-10 11:44 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-02-10 11:44 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-block, stefanha, qemu-devel
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-10 11:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 16:53 [PATCH] block: Remove unused blk_op_is_blocked() Kevin Wolf
2025-02-06 17:25 ` Philippe Mathieu-Daudé
2025-02-06 20:44 ` Kevin Wolf
2025-02-10 11:44 ` Philippe Mathieu-Daudé
2025-02-06 18:11 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).