qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: return allocated size fo


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: return allocated size for block device with qcow2 format
Date: Wed, 2 May 2018 09:02:14 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/02/2018 08:34 AM, Ivan Ren wrote:
qemu-img info with a block device which has a qcow2 format always
return 0 for disk size, and this can not reflect the qcow2 size
and the used space of the block device. This patch return the
allocated size of qcow2 as the disk size.

How does this differ from what qemu can already give you at runtime via the wr_highest_offset property in BlockDeviceStats, and related to the write_threshold ('block-set-write-threshold command, BLOCK_WRITE_THRESHOLD event)? Is there any code we can reuse, rather than writing something from scratch?


Signed-off-by: Ivan Ren <address@hidden>
---
  block/qcow2-bitmap.c |  69 +++++++++++++++++
  block/qcow2.c        | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++
  block/qcow2.h        |  42 ++++++++++
  3 files changed, 323 insertions(+)


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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