aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-12-11 21:39:19 +0300
committerEric Blake <eblake@redhat.com>2021-02-03 08:00:33 -0600
commit69b55e03f7e65a36eb954d0b7d4698b258df2708 (patch)
tree8a5c36845a2804a3ad04147c2de3bc727a840a48 /block/file-posix.c
parentc9308314460f46c2bbc4a672a3a39ac842434bf1 (diff)
downloadqemu-69b55e03f7e65a36eb954d0b7d4698b258df2708.zip
qemu-69b55e03f7e65a36eb954d0b7d4698b258df2708.tar.gz
qemu-69b55e03f7e65a36eb954d0b7d4698b258df2708.tar.bz2
block: refactor bdrv_check_request: add errp
It's better to pass &error_abort than just assert that result is 0: on crash, we'll immediately see the reason in the backtrace. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20201211183934.169161-2-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: fix iotest 206 fallout] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/file-posix.c')
-rw-r--r--block/file-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index 11aafa9..05079b4 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2969,7 +2969,7 @@ raw_do_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes,
req->bytes = BDRV_MAX_LENGTH - req->offset;
- assert(bdrv_check_request(req->offset, req->bytes) == 0);
+ bdrv_check_request(req->offset, req->bytes, &error_abort);
bdrv_make_request_serialising(req, bs->bl.request_alignment);
}