All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info
@ 2017-06-06  7:03 sochin.jiang
  2017-06-06 13:53 ` sochin.jiang
  0 siblings, 1 reply; 2+ messages in thread
From: sochin.jiang @ 2017-06-06  7:03 UTC (permalink / raw)
  To: armbru, kwolf, mreitz
  Cc: qemu-block, qemu-devel, sochin.jiang, eric.fangyi, subo7,
	xieyingtai, lina.lulina, zhangshuai13, lizhengui

From: "sochin.jiang" <sochin.jiang@huawei.com>

 Supplement the omitted 'disk size' bytes information when using

 'qemu-img info',it is useful in some occasion. Anyhow, it looks

 strange that 'virtual size' has bytes while actual 'disk size'

 does not.

Signed-off-by: sochin.jiang <sochin.jiang@huawei.com>
---
 block/qapi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index a40922e..9bb5956 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -703,10 +703,11 @@ void bdrv_image_info_dump(fprintf_function func_fprintf, void *f,
                  "image: %s\n"
                  "file format: %s\n"
                  "virtual size: %s (%" PRId64 " bytes)\n"
-                 "disk size: %s\n",
+                 "disk size: %s (%" PRId64 " bytes)\n",
                  info->filename, info->format, size_buf,
                  info->virtual_size,
-                 dsize_buf);
+                 dsize_buf,
+                 info->actual_size);
 
     if (info->has_encrypted && info->encrypted) {
         func_fprintf(f, "encrypted: yes\n");
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info
  2017-06-06  7:03 [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info sochin.jiang
@ 2017-06-06 13:53 ` sochin.jiang
  0 siblings, 0 replies; 2+ messages in thread
From: sochin.jiang @ 2017-06-06 13:53 UTC (permalink / raw)
  To: armbru, kwolf, mreitz
  Cc: qemu-block, qemu-devel, eric.fangyi, subo7, xieyingtai,
	lina.lulina, zhangshuai13, lizhengui

Please ignore this patch, I realize that there are some unfixed problems,
like iotest, etc.

On 2017/6/6 15:03, sochin.jiang wrote:
> From: "sochin.jiang" <sochin.jiang@huawei.com>
>
>  Supplement the omitted 'disk size' bytes information when using
>
>  'qemu-img info',it is useful in some occasion. Anyhow, it looks
>
>  strange that 'virtual size' has bytes while actual 'disk size'
>
>  does not.
>
> Signed-off-by: sochin.jiang <sochin.jiang@huawei.com>
> ---
>  block/qapi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/block/qapi.c b/block/qapi.c
> index a40922e..9bb5956 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -703,10 +703,11 @@ void bdrv_image_info_dump(fprintf_function func_fprintf, void *f,
>                   "image: %s\n"
>                   "file format: %s\n"
>                   "virtual size: %s (%" PRId64 " bytes)\n"
> -                 "disk size: %s\n",
> +                 "disk size: %s (%" PRId64 " bytes)\n",
>                   info->filename, info->format, size_buf,
>                   info->virtual_size,
> -                 dsize_buf);
> +                 dsize_buf,
> +                 info->actual_size);
>  
>      if (info->has_encrypted && info->encrypted) {
>          func_fprintf(f, "encrypted: yes\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-06 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06  7:03 [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info sochin.jiang
2017-06-06 13:53 ` sochin.jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.