aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-11-22 16:57:48 +0100
committerKevin Wolf <kwolf@redhat.com>2019-12-18 11:21:16 +0100
commit3b65081638c68be1c6ed08635c8acd99f32320ac (patch)
treea966d54d2b18e722ec71b94dbe9619a33ae6f063 /block
parent1ef7d9d368eb76d64e86e4d1251eb8e53881ff26 (diff)
downloadqemu-3b65081638c68be1c6ed08635c8acd99f32320ac.zip
qemu-3b65081638c68be1c6ed08635c8acd99f32320ac.tar.gz
qemu-3b65081638c68be1c6ed08635c8acd99f32320ac.tar.bz2
qcow2: Declare BDRV_REQ_NO_FALLBACK supported
In the common case, qcow2_co_pwrite_zeroes() already only modifies metadata case, so we're fine with or without BDRV_REQ_NO_FALLBACK set. The only exception is when using an external data file, where the request is passed down to the block driver of the external data file. We are forwarding the BDRV_REQ_NO_FALLBACK flag there, though, so this is fine, too. Declare the flag supported therefore. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com>
Diffstat (limited to 'block')
-rw-r--r--block/qcow2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 7c18721..de0e89c 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1722,7 +1722,8 @@ static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options,
}
}
- bs->supported_zero_flags = header.version >= 3 ? BDRV_REQ_MAY_UNMAP : 0;
+ bs->supported_zero_flags = header.version >= 3 ?
+ BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK : 0;
/* Repair image if dirty */
if (!(flags & (BDRV_O_CHECK | BDRV_O_INACTIVE)) && !bs->read_only &&