qemu-devel
[Top][All Lists]
Advanced

[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: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple
Date: Wed, 28 May 2014 13:29:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 27.05.2014 um 19:45 hat Benoît Canet geschrieben:
> The Tuesday 27 May 2014 à 17:29:16 (+0200), Paolo Bonzini wrote :
> > 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
> 
> That seems to be 4k aligned. It's better than I though.

These 4k are probably the host file system block size.

Kevin



reply via email to

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