block: Fix error code in multiwrite for immediate failures
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
cb6d3ca07b
commit
0f0b604b00
4
block.c
4
block.c
@ -1881,10 +1881,10 @@ int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs)
|
|||||||
// submitted yet. Otherwise we'll wait for the submitted AIOs to
|
// submitted yet. Otherwise we'll wait for the submitted AIOs to
|
||||||
// complete and report the error in the callback.
|
// complete and report the error in the callback.
|
||||||
if (mcb->num_requests == 0) {
|
if (mcb->num_requests == 0) {
|
||||||
reqs[i].error = EIO;
|
reqs[i].error = -EIO;
|
||||||
goto fail;
|
goto fail;
|
||||||
} else {
|
} else {
|
||||||
mcb->error = EIO;
|
mcb->error = -EIO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user