On 2017-05-03 14:25, Vladimir Sementsov-Ogievskiy wrote: > Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They > are loaded when the image is opened and become BdrvDirtyBitmaps for the > corresponding drive. > > Extra data in bitmaps is not supported for now. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > block/qcow2-bitmap.c | 387 > +++++++++++++++++++++++++++++++++++++++++++++++++++ > block/qcow2.c | 17 ++- > block/qcow2.h | 2 + > 3 files changed, 404 insertions(+), 2 deletions(-) > > diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c > index b8e472b3e8..a2522d7ccf 100644 > --- a/block/qcow2-bitmap.c > +++ b/block/qcow2-bitmap.c
[...] > @@ -437,3 +602,225 @@ out: [...] > +/* for g_slist_foreach for GSList of BdrvDirtyBitmap* elements */ > +static void set_readonly_helper(gpointer bitmap, gpointer unused) > +{ > + bdrv_dirty_bitmap_set_readonly(bitmap); > +} > + > +/* qcow2_load_autoloading_dirty_bitmaps() > + * Return value is a hint for caller: true means that Qcow2 header was > updated. "...that the Qcow2 header..." > + * (false doesn't mean that header should be updated by caller, it just means "...that the header...", "...by the caller, ..." > + * that updating was not needed or image can not be written). "...or the image cannot be written [to]" > + * On fail the function returns false. "On failure..." With these fixed: Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature