[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not alway

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple
Date: Tue, 27 May 2014 17:29:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 27/05/2014 18:00, Benoît Canet ha scritto:
> Are you worried that the host file system will lay out data poorly
> because the file looks like this?
> | header (1C) | refcounts (2C) | L1 (512B) | hole | Next cluster |
> B = bytes
> C = clusters
> My guess is the next cluster will be aligned to a reasonable boundary on
> the physical disk.

I have some kind of doubt. Does anyone knows a filesystem guru ?

Not a guru, but indeed there is a risk that the layout will be worse than necessary.

I think holes are ignored unless they are big enough, but 64K-512 is probably enough to create one. Indeed here I get this:

    $ qemu-img create -f qcow2 foo.qcow2 10G
    $ qemu-io -c 'write 0 512' foo.qcow2
    $ qemu-img map -f raw foo.qcow2 10G
    Offset          Length          Mapped to       File
    0               0x31000         0               foo.qcow2
    0x40000         0x20000         0x40000         foo.qcow2

I don't know if this has any practical impact, but if the fix is easy...


reply via email to

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