On 10/13/2010 09:16 AM, Avi Kivity wrote:
On 10/13/2010 04:11 PM, Anthony Liguori wrote:
Why would you ever update the header, apart from relocating L1 for
some reason?
To update the L1/L2 tables clean bit. That's what prevents a check
in the normal case where you have a clean shutdown.
I see - so you wouldn't update it every allocation, only when the disk
has been quiet for a while.
Right, the current plan is to flush the header dirty bit on shutdown or
whenever there is an explicit flush of the device. Current that is
caused by either a guest-initiated flush or a L1 update. We also plan
to add a timer-based flush such that a flush is scheduled for some
period of time (like 5 minutes) after the dirty bit is set.
The end result should be that the only window for requiring a metadata
scan is if a crash occurs within 5 minutes of a cluster allocation and
an explicit flush has not occurred for some other reason.
Regards,
Anthony Liguori