[PATCH] xfs: synchronously write the superblock on unmount

Dave Chinner david at fromorbit.com
Wed Jun 27 05:08:38 CDT 2012


On Tue, Jun 26, 2012 at 11:00:52AM -0500, tinguely at sgi.com wrote:
> xfs_wait_buftarg() does not wait for the completion of the write of the uncached
> superblock. This write can race with the shutdown of the log and cause a panic if the
> write does not win the race. Per Dave's suggestion, turn the final write of the
> superblock into a syncronous write.

Not quite what I suggested. You removed the transaction that logs
the changes first. That needs to stay, otherwise we are writing
unlogged changes to the superblock, and have the possibility of a
crash before the unmount record is written causing log recovery to
modify the superblock and not have all the correct changes in the
log.

So it first needs to log the changes (synchronously), then write the
changes (synchronously).

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list