mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
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>
This commit is contained in:
@ -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++) {
|
||||
|
Reference in New Issue
Block a user