Il 18/06/2013 10:56, Kevin Wolf ha scritto: >> > >> > It is a huge swamp indeed. >> > >> > Since we stop all block jobs on media change already, what about just >> > adding a command "block-job-attach" or something like that which exposes >> > the target of the job as a blockdev (presumably so that you can then add >> > it to the NBD server)? > This is backwards. You should really give the block job a target BDS to > begin with, not a file name.
That's also ok... We can get the backing file right for the target BDS at the beginning of the backup job with a combination of close_unused_images (so that it is "as if" block-backup had opened the file with BDRV_O_NO_BACKING), bdrv_append and bdrv_swap (append the target to the VM's BDS, swap the two). So why do we need this new option to drive_add? The "drive" ImageCreationMode, for which Fam has a patch too, should do. Paolo