> Wait, what's happening here? I don't understand this patch and how it's > related to snapshotting non-file protocols (if this is even what you > mean). What is your exact scenario, what does the existing code do in > it, and how does this change improve it? An empty commit message is > definitely not appropriate for such a change. > > In any case, using NULL as drv for bdrv_open() looks plain wrong.
When passing drv bdrv_open tries to open the url as qcow2 or another plain file format and fail. bdrv_file_open is not a better option because it won't return a BlockDriverState constructed in the same way as the old one. (raw as bs and quorum as ->file) I agree that this patch is a hack and I am looking for a better way of doing it. Benoît