Hi Eric,
On 21/4/25 17:03, Eric Blake wrote:
On Mon, Apr 21, 2025 at 12:19:14AM +0800, Sunny Zhu wrote:
Keep it consistent with *bdrv_co_pdiscard.
Currently, there is no BlockDriver implemented the bdrv_aio_pdiscard() function,
so we don’t need to make any adaptations either.
If there are no drivers implementing the callback, then why have it?
I think we have been moving towards more coroutine-based callbacks and
away from the aio callbacks; if so, should we instead be deleting this
callback as stale code?
Could we add a comment in BlockDriver prototypes about prefering co over
aio implementations, possibly mentioning them as legacy?
Signed-off-by: Sunny Zhu <sunnyz...@qq.com>
---
include/block/block_int-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index ebb4e56a50..4bf422d733 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -507,7 +507,7 @@ struct BlockDriver {
BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque);
BlockAIOCB * GRAPH_RDLOCK_PTR (*bdrv_aio_pdiscard)(
- BlockDriverState *bs, int64_t offset, int bytes,
+ BlockDriverState *bs, int64_t offset, int64_t bytes,
BlockCompletionFunc *cb, void *opaque);
int coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_readv)(BlockDriverState *bs,
--
2.43.0