From 69b55e03f7e65a36eb954d0b7d4698b258df2708 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Fri, 11 Dec 2020 21:39:19 +0300 Subject: 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 Message-Id: <20201211183934.169161-2-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake [eblake: fix iotest 206 fallout] Signed-off-by: Eric Blake --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/file-posix.c') 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); } -- cgit v1.1