diff options
| author | Stefan Hajnoczi | 2022-10-13 20:59:02 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2022-10-26 20:56:42 +0200 |
| commit | f4ec04bae9577eaa55ac35f3971dc3086a4a9192 (patch) | |
| tree | fbb0a27e7d6c59e3593838e77c1cbfeb43703c03 /block/block-backend.c | |
| parent | block: add BDRV_REQ_REGISTERED_BUF request flag (diff) | |
| download | qemu-f4ec04bae9577eaa55ac35f3971dc3086a4a9192.tar.gz qemu-f4ec04bae9577eaa55ac35f3971dc3086a4a9192.tar.xz qemu-f4ec04bae9577eaa55ac35f3971dc3086a4a9192.zip | |
block: return errors from bdrv_register_buf()
Registering an I/O buffer is only a performance optimization hint but it
is still necessary to return errors when it fails.
Later patches will need to detect errors when registering buffers but an
immediate advantage is that error_report() calls are no longer needed in
block driver .bdrv_register_buf() functions.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20221013185908.1297568-8-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/block-backend.c')
| -rw-r--r-- | block/block-backend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index ae42474891..4f59664397 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2545,10 +2545,10 @@ static void blk_root_drained_end(BdrvChild *child, int *drained_end_counter) } } -void blk_register_buf(BlockBackend *blk, void *host, size_t size) +bool blk_register_buf(BlockBackend *blk, void *host, size_t size, Error **errp) { GLOBAL_STATE_CODE(); - bdrv_register_buf(blk_bs(blk), host, size); + return bdrv_register_buf(blk_bs(blk), host, size, errp); } void blk_unregister_buf(BlockBackend *blk, void *host, size_t size) |
