qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function b


From: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function bdrv_query_image_info()
Date: Tue, 26 Feb 2013 15:30:01 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

于 2013-2-20 7:04, Eric Blake 写道:
On 02/18/2013 07:09 AM, Wenchao Xia wrote:
   This patch add function bdrv_query_image_info(), which will return
image info in qmp object format. The implementation code are based
on the code moved from qemu-img.c, but use block layer function to get
snapshot info.
   A check with bdrv_can_read_snapshot(), was done before collecting
snapshot info.

Signed-off-by: Wenchao Xia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>

Again, your cover letter says you heavily touched this patch; leaving my
Reviewed-by intact is misleading.

  Ok, it will be removed if any change was done.

+++ b/block.c
@@ -2649,6 +2649,11 @@ void bdrv_iterate(void (*it)(void *opaque, 
BlockDriverState *bs), void *opaque)
      }
  }

+static const char *bdrv_get_filename(const BlockDriverState *bs)
+{
+    return bs->filename;
+}

This function is now a waste.  Since it is static to this file only, and
the only thing it is doing is accessing a field inside bs, all
call-sites have access to the same field directly, without having to go
through this wrapper.


  OK.


--
Best Regards

Wenchao Xia




reply via email to

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