> On Wed, 07/20 09:09, Paolo Bonzini wrote:
> > On 20/07/2016 06:37, Fam Zheng wrote:
> > > Yes, you are right about this, I was confused because "qemu-img map" does
> > > not
> > > report this allocation state after zero write. (No idea why SEEK_DATA
> > > doesn't
> > > hit the fallocate'ed area.)
> > 
> > Apparently it's because it's zeroed.
> > 
> > $ fallocate -z -o 10485760 -l 10485760 test
> > $ fallocate -p -o 49152000 -l 10485760 test
> > $ fallocate -o 49152000 -l 10485760 test
> > $ fallocate -p -o 65536000 -l 10485760 test
> > 
> > Now we have:
> > 
> > - a zero area at 10240K..20480K
> > 
> > - an hole+allocated area at 48000K..59240K
> > 
> > - a hole at 64000K..74240K
> > 
> > $ qemu-img map test
> > Offset          Length          Mapped to       File
> > 0               0xa00000        0               test    << ends at 10240K
> > 0x1400000       0x1ae0000       0x1400000       test    << ends at 48000K
> > 0x38e0000       0x5a0000        0x38e0000       test    << ends at 64000K
> > 0x4880000       0x1b80000       0x4880000       test
> 
> Hah? I'm apparently missing something. I can't see these entries:
> 
> > fam@ad:/var/tmp$ cat /tmp/sh
> > touch test
> > fallocate -z -o 10485760 -l 10485760 test
> > fallocate -p -o 49152000 -l 10485760 test
> > fallocate -o 49152000 -l 10485760 test
> > fallocate -p -o 65536000 -l 10485760 test
> > qemu-img map test
> > fam@ad:/var/tmp$ sh /tmp/sh
> > Offset          Length          Mapped to       File
> 
> (I'm using Fedora 24 but I've also tried RHEL 7.)

That was after a full allocation of a 1GB file.  I didn't copy that line
because I had the file lying around from another day--sorry.

Paolo

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to