Message ID | 20181203101429.88735-3-anton.nefedov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | qcow2: cluster space preallocation | expand |
On Mon 03 Dec 2018 11:14:54 AM CET, Anton Nefedov wrote: > Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Berto
03.12.2018 13:14, Anton Nefedov wrote: > Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
diff --git a/block/blkverify.c b/block/blkverify.c index 89bf4386e3..bb52596cbb 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -141,8 +141,14 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } - bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED; - bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED; + bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | + (BDRV_REQ_FUA & + bs->file->bs->supported_write_flags & + s->test_file->bs->supported_write_flags); + bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | + ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) & + bs->file->bs->supported_zero_flags & + s->test_file->bs->supported_zero_flags); ret = 0; fail:
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> --- block/blkverify.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)