Il 08/06/2012 15:19, Jeff Cody ha scritto: >> > >> > This means copying allocated blocks from snap1.qcow2 and writing them >> > into vm001.img. Once this process is complete it is safe to delete >> > snap1.qcow2 since all data is now in vm001.img. > Yes, this is the same as what we are wanting to accomplish. The trick > here is open vm001.img r/w, in a safe manner (by safe, I mean able to > abort in case of error while keeping the guest running live). > > My thoughts on this has revolved around something similar to what was > done in bdrv_append(), where a duplicate BDS is created, a new file-open > performed with the appropriate access mode flags, and if successful > swapped out for the originally opened BDS for vm001.img. If there is an > error, the new BDS is abandoned without modifying the BDS list. >
I haven't yet read the rest of the thread, but I'll drop here that indeed I have a bdrv_swap in my patches for block mirroring. A live commit of the topmost image is really just a mirroring operation, the only thing that changes is the mechanics of opening the target and perhaps also switching to it. Paolo