mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06: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:
parent
e8b6535533
commit
f4ec04bae9
7 changed files with 52 additions and 18 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue