All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] info blockstats (block-qcow2): show highest allocated offset (bytes)
@ 2009-01-08 18:49 Uri Lublin
  2009-01-08 19:37 ` Anthony Liguori
  2009-01-09  9:09 ` Kevin Wolf
  0 siblings, 2 replies; 8+ messages in thread
From: Uri Lublin @ 2009-01-08 18:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Uri Lublin

From: Uri Lublin <uril@redhat.com>

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


The first patch calculates the highest byte for qcow2 images (block-qcow2.c)
The second patch exposed it through a BlockDeviceInfo
The third patch term_prints it upon info blockstats (for qcow2 images)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-12  9:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 18:49 [Qemu-devel] [PATCH 0/3] info blockstats (block-qcow2): show highest allocated offset (bytes) Uri Lublin
2009-01-08 19:37 ` Anthony Liguori
2009-01-11  9:26   ` Uri Lublin
2009-01-11 15:16     ` Shahar Frank
2009-01-09  9:09 ` Kevin Wolf
2009-01-11  9:31   ` Uri Lublin
2009-01-11 14:56   ` Shahar Frank
2009-01-12  9:50     ` Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.