xfs
[Top] [All Lists]

Re: [PATCH] xfs: synchronously write the superblock on unmount

To: tinguely@xxxxxxx
Subject: Re: [PATCH] xfs: synchronously write the superblock on unmount
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 27 Jun 2012 20:08:38 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120626160102.898671754@xxxxxxx>
References: <20120626160051.364635296@xxxxxxx> <20120626160102.898671754@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jun 26, 2012 at 11:00:52AM -0500, tinguely@xxxxxxx 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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>