qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed
Date: Fri, 20 May 2016 00:39:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 05/20/2016 12:25 AM, Stefan Hajnoczi wrote:
On Sat, May 14, 2016 at 03:45:49PM +0300, Denis V. Lunev wrote:
diff --git a/block/io.c b/block/io.c
index cd6d71a..88af10c 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1828,8 +1828,8 @@ int bdrv_is_allocated_above(BlockDriverState *top,
      return 0;
  }
-int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
-                          const uint8_t *buf, int nb_sectors)
+int bdrv_co_write_compressed(BlockDriverState *bs, int64_t sector_num,
+                             int nb_sectors, QEMUIOVector *qiov)
Please use the coroutine_fn attribute to declare that this function must
be called in coroutine context.

diff --git a/include/block/block_int.h b/include/block/block_int.h
index a029c20..3c93ddb 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -208,6 +208,9 @@ struct BlockDriver {
      int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num,
                                   const uint8_t *buf, int nb_sectors);
+ int (*bdrv_co_write_compressed)(BlockDriverState *bs, int64_t sector_num,
+                                    int nb_sectors, QEMUIOVector *qiov);
Please add the coroutine_fn attribute just like .bdrv_co_readv() and
friends.
yep. This seems right thing to do.



reply via email to

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