[libvirt] [RFC/WIP] [PATCH 0/5] Add support for revert and delete operations to external disk snapshots

Povilas Kanapickas posted 5 patches 5 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20181021163852.15114-1-povilas@radix.lt
src/qemu/qemu_domain.c |  45 ++++-
src/qemu/qemu_driver.c | 372 +++++++++++++++++++++++++++++++++++++----
2 files changed, 379 insertions(+), 38 deletions(-)
[libvirt] [RFC/WIP] [PATCH 0/5] Add support for revert and delete operations to external disk snapshots
Posted by Povilas Kanapickas 5 years, 5 months ago
Hey all,

Currently libvirt only supports creation of external disk snapshots, but not 
reversion and deletion which are essential for any serious use of this feature. 
I've looked into implementing removal and reversion of external disk snapshots 
and came up with some prototype code that works with my simple test VMs (see 
attached patches).

I'd like to discuss about how these features could be implemented properly. As 
I've never significantly contributed to libvirt yet, I wanted to delay the 
discussion until I understand the problem space myself so that the discussion
could be productive.

My current approach is relatively simple. For snapshot deletion we either
simply remove the disk or use `qemu-img rebase` to reparent a snapshot on top 
of the parent of the snapshot that is being deleted. For reversion we delete 
the current overlay disk and create another that uses the image of the
snapshot we want to revert to as the backing disk.

Are the attached patches good in principle? Are there any major blockers aside 
from lack of tests, code formatting, bugs and so on? Are there any design
issues which prevent a simple implementation of external disk snapshot 
support that I didn't see?

If there aren't significant blockers, my plan would be to continue work on the 
feature until I have something that could actually be reviewed and possibly
merged.

Regards,
Povilas

Povilas Kanapickas (5):
  snapshot: Implement reverting for external disk snapshots
  snapshot: Add VIR_DEBUG to qemuDomainSnapshotCreateXML()
  snapshot: Support deleting external disk snapshots when deleting
  snapshot: Extract qemuDomainSnapshotReparentChildrenMetadata()
  snapshot: Support reparenting external disk snapshots when deleting

 src/qemu/qemu_domain.c |  45 ++++-
 src/qemu/qemu_driver.c | 372 +++++++++++++++++++++++++++++++++++++----
 2 files changed, 379 insertions(+), 38 deletions(-)

-- 
2.17.1


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC/WIP] [PATCH 0/5] Add support for revert and delete operations to external disk snapshots
Posted by Povilas Kanapickas 5 years, 4 months ago
On 21/10/2018 19:38, Povilas Kanapickas wrote:
> Hey all,
> 
> Currently libvirt only supports creation of external disk snapshots, but not 
> reversion and deletion which are essential for any serious use of this feature. 
> I've looked into implementing removal and reversion of external disk snapshots 
> and came up with some prototype code that works with my simple test VMs (see 
> attached patches).
> 
> I'd like to discuss about how these features could be implemented properly. As 
> I've never significantly contributed to libvirt yet, I wanted to delay the 
> discussion until I understand the problem space myself so that the discussion
> could be productive.
> 
> My current approach is relatively simple. For snapshot deletion we either
> simply remove the disk or use `qemu-img rebase` to reparent a snapshot on top 
> of the parent of the snapshot that is being deleted. For reversion we delete 
> the current overlay disk and create another that uses the image of the
> snapshot we want to revert to as the backing disk.
> 
> Are the attached patches good in principle? Are there any major blockers aside 
> from lack of tests, code formatting, bugs and so on? Are there any design
> issues which prevent a simple implementation of external disk snapshot 
> support that I didn't see?
> 
> If there aren't significant blockers, my plan would be to continue work on the 
> feature until I have something that could actually be reviewed and possibly
> merged.
> 

Friendly ping :-)

Regards,
Povilas

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list