[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 03/42] throttle: Support compressed writes
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v6 03/42] throttle: Support compressed writes |
Date: |
Fri, 9 Aug 2019 18:13:28 +0200 |
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block/throttle.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block/throttle.c b/block/throttle.c
index 0349f42257..958a2bcfa6 100644
--- a/block/throttle.c
+++ b/block/throttle.c
@@ -153,6 +153,15 @@ static int coroutine_fn
throttle_co_pdiscard(BlockDriverState *bs,
return bdrv_co_pdiscard(bs->file, offset, bytes);
}
+static int coroutine_fn throttle_co_pwritev_compressed(BlockDriverState *bs,
+ uint64_t offset,
+ uint64_t bytes,
+ QEMUIOVector *qiov)
+{
+ return throttle_co_pwritev(bs, offset, bytes, qiov,
+ BDRV_REQ_WRITE_COMPRESSED);
+}
+
static int throttle_co_flush(BlockDriverState *bs)
{
return bdrv_co_flush(bs->file->bs);
@@ -251,6 +260,7 @@ static BlockDriver bdrv_throttle = {
.bdrv_co_pwrite_zeroes = throttle_co_pwrite_zeroes,
.bdrv_co_pdiscard = throttle_co_pdiscard,
+ .bdrv_co_pwritev_compressed = throttle_co_pwritev_compressed,
.bdrv_recurse_is_first_non_filter =
throttle_recurse_is_first_non_filter,
--
2.21.0
- [Qemu-devel] [PATCH v6 00/42] block: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 01/42] block: Mark commit and mirror as filter drivers, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 02/42] copy-on-read: Support compressed writes, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 03/42] throttle: Support compressed writes,
Max Reitz <=
- [Qemu-devel] [PATCH v6 05/42] block: Add chain helper functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 06/42] qcow2: Implement .bdrv_storage_child(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 04/42] block: Add child access functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 07/42] block: *filtered_cow_child() for *has_zero_init(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 08/42] block: bdrv_set_backing_hd() is about bs->backing, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 10/42] block: Drop bdrv_is_encrypted(), Max Reitz, 2019/08/09