qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 11/47] backup-top: Support compressed writes


From: Andrey Shinkevich
Subject: Re: [PATCH v7 11/47] backup-top: Support compressed writes
Date: Wed, 8 Jul 2020 20:59:49 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 25.06.2020 18:21, Max Reitz wrote:
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,

Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]