qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] info blockstats (block-qcow2): show highest


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 0/3] info blockstats (block-qcow2): show highest allocated offset (bytes)
Date: Thu, 08 Jan 2009 13:37:47 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Uri Lublin wrote:
From: Uri Lublin <address@hidden>

This patchset let the user know the highest allocated byte of qcow2 images.
Actually it's the first unallocated byte after the highest byte written,
cluster-size aligned.

The highest allocated byte gives a maximal limit (easy to calculate)
to the number of bytes allocated for that image, and may hint how many more allocations can be done before we reach end-of-file (end of host block device). Although there may be many free blocks below that number (allocated and freed) the file system can not deallocate those blocks, and they have to be reused
by qemu. Also note that due to fragmentation those free blocks may not
be used on next allocations.

It can be useful for truncation of backing file images (ftruncate).
Also it may be useful for defragmentation later (although we'll need
the number of free blocks as well).

I'm having trouble seeing the utility of this as it seems to be not really reliable. Surely, after a lot of work, you'll have one block far at the end of the file, no? I don't see how knowing this location helps practically speaking. Can you explain a little more about what you want to use this functionality for?

Regards,

Anthony Liguori





reply via email to

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