All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Some uncertain about implementing stream optimized writing
@ 2011-06-29  4:47 Fam Zheng
  2011-06-29  5:47 ` Stefan Hajnoczi
  2011-06-29  8:15 ` Kevin Wolf
  0 siblings, 2 replies; 6+ messages in thread
From: Fam Zheng @ 2011-06-29  4:47 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Kevin Wolf

Hi,

I have implemented reading for sparse optimized and come to implement
writing. It is a little complicated and I am not sure what is the best
approach. Could you give me some advice?

Here is the details: (pasted from http://warm.la/soc/?p=98)

Stream optimized VMDK image allocates minimized space for a compressed
cluster, which means if there is high compress ratio, a cluster
possibly only takes one physical sector in the file. It makes
overwriting hard, especially when new data needs more sectors than
previously allocated.

Attach the image to VMware and boot the VM to test this format, it
seems that VMware wouldn’t do write to allocated clusters, but can
allocate new cluster to save data.

Overwriting existing cluster requires measuring new data size and
deciding whether in-place overwrite is OK, if not we must look for
other free space. Metadata in image has no such information for sector
allocation algorithm, so if we want to fully enable writing to stream
optimized, sector allocation bitmap will be introduced into block
state. This should significantly increase memory usage and somehow
complicate the driver.

Another approach I think of is to allocate each non-inplace at the end
of image and leave the old allocation unreferenced, which wastes disk
space.

-- 
Best regards!
Fam Zheng

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

end of thread, other threads:[~2011-06-29  8:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29  4:47 [Qemu-devel] Some uncertain about implementing stream optimized writing Fam Zheng
2011-06-29  5:47 ` Stefan Hajnoczi
2011-06-29  6:18   ` Fam Zheng
2011-06-29  8:12     ` Stefan Hajnoczi
2011-06-29  8:15 ` Kevin Wolf
2011-06-29  8:32   ` Fam Zheng

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.