[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 04/13] block: support BDRV_REQ_ALLOCATE in passth
From: |
Anton Nefedov |
Subject: |
[Qemu-devel] [PATCH v3 04/13] block: support BDRV_REQ_ALLOCATE in passthrough drivers |
Date: |
Mon, 31 Jul 2017 19:21:56 +0300 |
Support the flag if the underlying BDS supports it
Signed-off-by: Anton Nefedov <address@hidden>
---
block/blkdebug.c | 3 ++-
block/raw-format.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index c19ab28..ef2d764 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -414,7 +414,8 @@ static int blkdebug_open(BlockDriverState *bs, QDict
*options, int flags,
bs->supported_write_flags = BDRV_REQ_FUA &
bs->file->bs->supported_write_flags;
- bs->supported_zero_flags = (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) &
+ bs->supported_zero_flags =
+ (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) &
bs->file->bs->supported_zero_flags;
ret = -EINVAL;
diff --git a/block/raw-format.c b/block/raw-format.c
index 142649e..fc97a7d 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -421,7 +421,8 @@ static int raw_open(BlockDriverState *bs, QDict *options,
int flags,
bs->sg = bs->file->bs->sg;
bs->supported_write_flags = BDRV_REQ_FUA &
bs->file->bs->supported_write_flags;
- bs->supported_zero_flags = (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP) &
+ bs->supported_zero_flags =
+ (BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_ALLOCATE) &
bs->file->bs->supported_zero_flags;
if (bs->probed && !bdrv_is_read_only(bs)) {
--
2.7.4
- [Qemu-devel] [PATCH v3 00/13] qcow2: space preallocation and COW improvements, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 02/13] block: treat BDRV_REQ_ALLOCATE as serialising, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 07/13] qcow2: truncate preallocated space, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 03/13] file-posix: support BDRV_REQ_ALLOCATE, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 04/13] block: support BDRV_REQ_ALLOCATE in passthrough drivers,
Anton Nefedov <=
- [Qemu-devel] [PATCH v3 06/13] qcow2: set inactive flag, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 01/13] block: introduce BDRV_REQ_ALLOCATE flag, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 05/13] qcow2: preallocation at image expand, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 09/13] qcow2: move is_zero_sectors() up, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 10/13] qcow2: skip writing zero buffers to empty COW areas, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 08/13] qcow2: check space leak at the end of the image, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 11/13] qcow2: allocate image space by-cluster, Anton Nefedov, 2017/07/31
- [Qemu-devel] [PATCH v3 13/13] iotest 134: test cluster-misaligned encrypted write, Anton Nefedov, 2017/07/31