[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 08/43] throttle: Support compressed writes
From: |
Max Reitz |
Subject: |
[PATCH v8 08/43] throttle: Support compressed writes |
Date: |
Tue, 1 Sep 2020 16:33:49 +0200 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
block/throttle.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block/throttle.c b/block/throttle.c
index 1c1ac57bee..b21ee42d98 100644
--- a/block/throttle.c
+++ b/block/throttle.c
@@ -151,6 +151,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);
@@ -243,6 +252,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_attach_aio_context = throttle_attach_aio_context,
.bdrv_detach_aio_context = throttle_detach_aio_context,
--
2.26.2
- [PATCH v8 00/43] block: Deal with filters, Max Reitz, 2020/09/01
- [PATCH v8 01/43] block: Add child access functions, Max Reitz, 2020/09/01
- [PATCH v8 03/43] block: bdrv_cow_child() for bdrv_has_zero_init(), Max Reitz, 2020/09/01
- [PATCH v8 02/43] block: Add chain helper functions, Max Reitz, 2020/09/01
- [PATCH v8 04/43] block: bdrv_set_backing_hd() is about bs->backing, Max Reitz, 2020/09/01
- [PATCH v8 06/43] block: Drop bdrv_is_encrypted(), Max Reitz, 2020/09/01
- [PATCH v8 05/43] block: Include filters when freezing backing chain, Max Reitz, 2020/09/01
- [PATCH v8 07/43] block: Add bdrv_supports_compressed_writes(), Max Reitz, 2020/09/01
- [PATCH v8 08/43] throttle: Support compressed writes,
Max Reitz <=
- [PATCH v8 09/43] copy-on-read: Support compressed writes, Max Reitz, 2020/09/01
- [PATCH v8 10/43] block: Use bdrv_filter_(bs|child) where obvious, Max Reitz, 2020/09/01
- [PATCH v8 11/43] block: Use CAFs in block status functions, Max Reitz, 2020/09/01
- [PATCH v8 12/43] stream: Deal with filters, Max Reitz, 2020/09/01
- [PATCH v8 13/43] block: Use CAFs when working with backing chains, Max Reitz, 2020/09/01
- [PATCH v8 14/43] block: Use bdrv_cow_child() in bdrv_co_truncate(), Max Reitz, 2020/09/01
- [PATCH v8 15/43] block: Re-evaluate backing file handling in reopen, Max Reitz, 2020/09/01
- [PATCH v8 17/43] vmdk: Drop vmdk_co_flush(), Max Reitz, 2020/09/01
- [PATCH v8 16/43] block: Flush all children in generic code, Max Reitz, 2020/09/01
- [PATCH v8 18/43] block: Iterate over children in refresh_limits, Max Reitz, 2020/09/01