Hi Dave,
It looks good to me.
Donald
David Chinner wrote:
> When we freeze the filesystem on a system that is under
> heavy load, the fleeze can complete it's flushes while there
> are still transactions active. Hence the freeze completes
> with a dirty log and dirty metadata buffers still in memory.
>
> The Linux freeze path is a tangled mess - I had to go back
> to the irix code to work out exactly what we should be doing
> to work out why the linux code was failing because of
> the convoluted paths the linux code takes through the
> generic layers.
>
> In short, when we freeze the writes, we should not be
> quiescing the filesystem at this point. All we should
> be doing is a blocking data sync because we haven't shut down
> the transaction subsystem yet. We also need to wait
> for all direct I/O writes to complete as well.
>
> Once the data sync is complete, we can return to the generic
> code for it to freeze new transactions. Then we can wait for
> all active transactions to complete before we quiesce the
> filesystem which flushes out all the dirty metadata buffers.
>
> At this point we have a clean filesystem and an empty log
> so we can safely write the unmount record followed by a
> dummy record to dirty the log to ensure unlinked list
> processing on remount if we crash or shut down the machine
> while the filesystem is frozen.
>
> Comments?
>
> Cheers,
>
> Dave.
|