[pve-devel] [PATCH-SERIES qemu 0/6] async snapshot improvements

Fiona Ebner f.ebner at proxmox.com
Mon Mar 31 17:06:59 CEST 2025


Am 31.03.25 um 16:55 schrieb Fiona Ebner:
> Most importantly, start using a dedicated IO thread for the state
> file when doing a live snapshot.
> 
> Having the state file be in the iohandler context means that a
> blk_drain_all() call in the main thread or vCPU thread that happens
> while the snapshot is running will result in a deadlock.

Forgot to mention, this is easily reproducible by shutting down or
rebooting a Linux VM with SCSI disk (from within the guest) while a
snapshot is being taken. Patch 5/6 contains technical details.

Note that shutting down the VM will still result in failure after these
patches, but it's much better, because it's not a deadlock anymore and I
guess it's kinda philosophically okay, because there can be no VM state
of a shutdown VM. Can still be changed later if we want to do something
differently there.

Much more interesting is the reboot scenario of course (think in the
context of time-based automated snapshots where the guest might be doing
whatever at the time a snapshot is taken, in particular reboot), which
now should work seamlessly and not result in a deadlock either anymore.




More information about the pve-devel mailing list