> Does this mean the journal forms the first-stage data structure for > deduplication? Dedup records will accumulate in the journal until it > becomes time to convert them in bulk into a more compact representation?
The journal is mainly used to persist the last inserted dedup metadata across QEMU stop and restart. I replay it at startup to rebuild the hash table. So yes it's the first stage even it's never used for regular queries. > > When I read this specification I was thinking of a journal purely for > logging operations. You could use a commit record to mark previous > records applied. Upon startup, qcow2 would inspect uncommitted records > and deal with them. Maybe that could help regular QCOW2 usage. I don't know.