diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-03-22 13:42:39 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-03-26 11:37:51 +0100 |
commit | 80f5c33ff31eb9333f5036ee278fb1483fb4ff41 (patch) | |
tree | b6c7859b0df98a34a54e1f3a10d742f74eb2f614 /block/copy-on-read.c | |
parent | fe0480d6294270ff0d6fb60e66bb725a6aad2043 (diff) |
block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers
Filter drivers that support .bdrv_co_pwrite_zeroes can safely advertise
BDRV_REQ_NO_FALLBACK because they just forward the request flags to
their child node.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/copy-on-read.c')
-rw-r--r-- | block/copy-on-read.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/block/copy-on-read.c b/block/copy-on-read.c index d670fec42b..53972b1da3 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-read.c @@ -34,12 +34,11 @@ static int cor_open(BlockDriverState *bs, QDict *options, int flags, } bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED | - (BDRV_REQ_FUA & - bs->file->bs->supported_write_flags); + (BDRV_REQ_FUA & bs->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); + ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK) & + bs->file->bs->supported_zero_flags); return 0; } |