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 /qemu-img.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 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c index 9fe94df650..a3b64c88af 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4570,7 +4570,7 @@ static int img_bench(int argc, char **argv) data.buf = blk_blockalign(blk, buf_size); memset(data.buf, pattern, data.nrreq * data.bufsize); - blk_register_buf(blk, data.buf, buf_size); + blk_register_buf(blk, data.buf, buf_size, &error_fatal); data.qiov = g_new(QEMUIOVector, data.nrreq); for (i = 0; i < data.nrreq; i++) { |