[Libguestfs] [PATCH nbdkit 0/6] cow: Implement trimming and extents.

Richard W.M. Jones rjones at redhat.com
Tue Jan 26 21:51:46 UTC 2021


This patch series implements trimming and extents in
nbdkit-cow-filter.  The aim of this is to have feature parity with
qcow2 zero clusters, which we can then use to replace the qcow2
overlays currently used to protect the source disk in virt-v2v.

First 3 patches are some preparatory enhancements/clean-up.

To implement extents: We iterate over the blocks in the filter, if the
block is allocated (ie. contains a write which has been saved in the
overlay) then the whole block is allocated data, else we have to ask
the underlying plugin for the information about that block.  (This
ends up making lots of small extents calls into the plugin, which
could be optimized in future.)

To implement trim: We extend the overlay bitmap with an extra bit per
block so we can store whether the block has been trimmed.  A future
optimization is to actually trim the overlay (it only saves space,
it's not needed for correctness), but this patch series does not do
this.

Final patch implements a couple of tests.

Rich.





More information about the Libguestfs mailing list