> > +They consist of transactions, which in turn contain operations that > > +are effectively executed atomically. A qcow2 image can have a main image > > +journal that deals with cluster management operations, and additional > > specific > > +journals can be used by other features like data deduplication. > > I'm not sure if multiple journals will work in practice. Doesn't this > re-introduce the need to order update steps and flush between them?
The flush and data has reached stable storage requirement of the deduplication journal are very weak. The deduplication code maintains an incompatible "dedup dirty" flag and flush the journal on exit then clear the flag. If the flag is set at startup all deduplication metadata and journal content are dropped and it does not harm the image file in any way. The code just starts over.