[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 11/47] backup-top: Support compressed writes
From: |
Max Reitz |
Subject: |
[PATCH v7 11/47] backup-top: Support compressed writes |
Date: |
Thu, 25 Jun 2020 17:21:39 +0200 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/backup-top.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block/backup-top.c b/block/backup-top.c
index af2f20f346..f304df8f26 100644
--- a/block/backup-top.c
+++ b/block/backup-top.c
@@ -99,6 +99,15 @@ static coroutine_fn int
backup_top_co_pwritev(BlockDriverState *bs,
return bdrv_co_pwritev(bs->backing, offset, bytes, qiov, flags);
}
+static coroutine_fn int backup_top_co_pwritev_compressed(BlockDriverState *bs,
+ uint64_t offset,
+ uint64_t bytes,
+ QEMUIOVector *qiov)
+{
+ return backup_top_co_pwritev(bs, offset, bytes, qiov,
+ BDRV_REQ_WRITE_COMPRESSED);
+}
+
static int coroutine_fn backup_top_co_flush(BlockDriverState *bs)
{
if (!bs->backing) {
@@ -173,6 +182,7 @@ BlockDriver bdrv_backup_top_filter = {
.bdrv_co_pwritev = backup_top_co_pwritev,
.bdrv_co_pwrite_zeroes = backup_top_co_pwrite_zeroes,
.bdrv_co_pdiscard = backup_top_co_pdiscard,
+ .bdrv_co_pwritev_compressed = backup_top_co_pwritev_compressed,
.bdrv_co_flush = backup_top_co_flush,
.bdrv_co_block_status = bdrv_co_block_status_from_backing,
--
2.26.2
- [PATCH v7 00/47] block: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 01/47] block: Add child access functions, Max Reitz, 2020/06/25
- [PATCH v7 03/47] block: bdrv_cow_child() for bdrv_has_zero_init(), Max Reitz, 2020/06/25
- [PATCH v7 02/47] block: Add chain helper functions, Max Reitz, 2020/06/25
- [PATCH v7 04/47] block: bdrv_set_backing_hd() is about bs->backing, Max Reitz, 2020/06/25
- [PATCH v7 05/47] block: Include filters when freezing backing chain, Max Reitz, 2020/06/25
- [PATCH v7 06/47] block: Drop bdrv_is_encrypted(), Max Reitz, 2020/06/25
- [PATCH v7 07/47] block: Add bdrv_supports_compressed_writes(), Max Reitz, 2020/06/25
- [PATCH v7 08/47] throttle: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 09/47] copy-on-read: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 11/47] backup-top: Support compressed writes,
Max Reitz <=
- [PATCH v7 12/47] block: Use bdrv_filter_(bs|child) where obvious, Max Reitz, 2020/06/25
- [PATCH v7 15/47] block: Use CAFs when working with backing chains, Max Reitz, 2020/06/25
- [PATCH v7 10/47] mirror-top: Support compressed writes, Max Reitz, 2020/06/25
- [PATCH v7 13/47] block: Use CAFs in block status functions, Max Reitz, 2020/06/25
- [PATCH v7 14/47] stream: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 16/47] block: Use bdrv_cow_child() in bdrv_co_truncate(), Max Reitz, 2020/06/25
- [PATCH v7 18/47] block: Flush all children in generic code, Max Reitz, 2020/06/25
- [PATCH v7 17/47] block: Re-evaluate backing file handling in reopen, Max Reitz, 2020/06/25
- [PATCH v7 19/47] vmdk: Drop vmdk_co_flush(), Max Reitz, 2020/06/25
- [PATCH v7 20/47] block: Iterate over children in refresh_limits, Max Reitz, 2020/06/25