[Top][All Lists]

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

[Qemu-devel] about qemu-img info on block dev

From: wang.guang55
Subject: [Qemu-devel] about qemu-img info on block dev
Date: Tue, 7 Nov 2017 15:18:03 +0800 (CST)


if we create a qcow2 file on a block dev.

we can,t get the right disk size by qemu-img info。

address@hidden qemu]# ./qemu-img create -f qcow2 /dev/zs/lvol0 1G

Formatting '/dev/zs/lvol0', fmt=qcow2 size=1073741824 cluster_size=65536 
lazy_refcounts=off refcount_bits=16

address@hidden qemu]# ./qemu-img info /dev/zs/lvol0 

image: /dev/zs/lvol0

file format: qcow2

virtual size: 1.0G (1073741824 bytes)

disk size: 0

cluster_size: 65536

Format specific information:

    compat: 1.1

    lazy refcounts: false

    refcount bits: 16

    corrupt: false

Then we get disk size from L1 table and L2 table in 

May be we can submit the patch to qemu master??

reply via email to

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