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...

Paolo

Reply via email to