qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 07/12] block/json: Add bdrv_co_get_block_stat


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v3 07/12] block/json: Add bdrv_co_get_block_status()
Date: Thu, 10 Apr 2014 21:00:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 10.04.2014 20:58, Benoît Canet wrote:
The Thursday 10 Apr 2014 à 20:43:38 (+0200), Max Reitz wrote :
Implement this function by passing it through to bs->file.

Signed-off-by: Max Reitz <address@hidden>
---
  block/json.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/block/json.c b/block/json.c
index cb83780..dfeec81 100644
--- a/block/json.c
+++ b/block/json.c
@@ -110,6 +110,13 @@ static coroutine_fn int 
json_co_write_zeroes(BlockDriverState *bs,
      return bdrv_co_write_zeroes(bs->file, sector_num, nb_sectors, flags);
  }
+static coroutine_fn int64_t json_co_get_block_status(BlockDriverState *bs,
+                                                     int64_t sector_num,
+                                                     int nb_sectors, int *pnum)
+{
+    return bdrv_get_block_status(bs->file, sector_num, nb_sectors, pnum);
+}
+
  static void json_invalidate_cache(BlockDriverState *bs, Error **errp)
  {
      return bdrv_invalidate_cache(bs->file, errp);
@@ -156,6 +163,7 @@ static BlockDriver bdrv_json = {
      .bdrv_aio_discard           = json_aio_discard,
.bdrv_co_write_zeroes = json_co_write_zeroes,
+    .bdrv_co_get_block_status   = json_co_get_block_status,
.bdrv_invalidate_cache = json_invalidate_cache, --
1.9.1

Reviewed-by: Benoit Canet <address@hidden>

Here you go :)

Thank you :D



reply via email to

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