On 19.12.19 11:02, Kevin Wolf wrote: > Am 18.12.2019 um 11:28 hat Vladimir Sementsov-Ogievskiy geschrieben:
[...] >> qcow2_write_snapshots actually called unlocked from >> qcow2_check_fix_snapshot_table.. It seems unsafe. > > This is curious, I'm not sure why you would drop the lock there. Max? > > bdrv_flush() calls would have to replaced with qcow2_write_caches() to > avoid a deadlock, but otherwise I don't see why we would want to drop > the lock. > > Of course, this should only be called from qemu-img check, so in > practice it's probably not a bug. Maybe I should have read all of this before replying... Is qcow2_write_caches() all that we want? I mean, bdrv_flush() also flushes the children (well, at least the file child right now). OTOH qcow2_write_snapshots() probably does not need to take care of actually flushing @bs, does it? Max
signature.asc
Description: OpenPGP digital signature
