[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v12 01/10] mirror: inherit supported write/zero flag
From: |
Anton Nefedov |
Subject: |
[Qemu-devel] [PATCH v12 01/10] mirror: inherit supported write/zero flags |
Date: |
Mon, 14 Jan 2019 11:18:23 +0000 |
Signed-off-by: Anton Nefedov <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block/mirror.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index f0b211a9c8..7b5a5f13a2 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1529,8 +1529,12 @@ static void mirror_start_job(const char *job_id,
BlockDriverState *bs,
mirror_top_bs->implicit = true;
}
mirror_top_bs->total_sectors = bs->total_sectors;
- mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED;
- mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED;
+ mirror_top_bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED |
+ (BDRV_REQ_FUA & bs->supported_write_flags);
+ mirror_top_bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED |
+ ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP)
+ & bs->supported_zero_flags);
+
bs_opaque = g_new0(MirrorBDSOpaque, 1);
mirror_top_bs->opaque = bs_opaque;
bdrv_set_aio_context(mirror_top_bs, bdrv_get_aio_context(bs));
--
2.17.1
- [Qemu-devel] [PATCH v12 00/10] qcow2: cluster space preallocation, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 02/10] blkverify: set supported write/zero flags, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 04/10] block: introduce BDRV_REQ_ALLOCATE flag, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 08/10] block: support BDRV_REQ_ALLOCATE in passthrough drivers, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 01/10] mirror: inherit supported write/zero flags,
Anton Nefedov <=
- [Qemu-devel] [PATCH v12 07/10] file-posix: support BDRV_REQ_ALLOCATE, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 03/10] quorum: set supported write flags, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 06/10] file-posix: reset fallocate-related flags without CONFIG_FALLOCATE*, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 10/10] iotest 134: test cluster-misaligned encrypted write, Anton Nefedov, 2019/01/14
- [Qemu-devel] [PATCH v12 05/10] block: treat BDRV_REQ_ALLOCATE as serialising, Anton Nefedov, 2019/01/14