[RFC PATCH 06/16] qemu: checkpoint: tolerate missing disks on checkpoint deletion
pkrempa at redhat.com
Mon Jan 27 09:11:34 UTC 2020
On Fri, Jan 24, 2020 at 12:47:41 -0600, Eric Blake wrote:
> On 1/9/20 12:21 PM, Peter Krempa wrote:
> > If a disk is unplugged and then the user tries to delete a checkpoint
> > the code would try to use NULL node name as it was not checked.
> > Fix this by fetching the whole disk definition object and verifying it
> > was found.
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---
> > src/qemu/qemu_checkpoint.c | 23 +++++++++++++++++------
> > 1 file changed, 17 insertions(+), 6 deletions(-)
> Reviewed-by: Eric Blake <eblake at redhat.com>
> But it also makes me wonder if the act of hot-unplug should update the
> definition of existing checkpoints. (Doesn't stop this patch from being
> useful as-is, but may point to further design work and future patches)
It can't since we chose to not version checkpoints on snapshots. Thus if
you've taken a checkpoint and then a snapshot and want to detach the
disk, reverting to the checkpoint will add the disk back and the
checkpoint must stay valid. As the checkpoint is not versioned we
wouldn't have the data to add it back.
More information about the libvir-list