xfs
[Top] [All Lists]

Re: [RFC] xfs: wait for the write of the superblock on unmount

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [RFC] xfs: wait for the write of the superblock on unmount
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Tue, 24 Jul 2012 09:03:36 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120724135758.GA6564@xxxxxxxxxxxxx>
References: <20120717215957.855744999@xxxxxxxxxxxxxxx> <20120718220003.396849822@xxxxxxxxxxxxxxx> <20120724135758.GA6564@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 07/24/12 08:57, Christoph Hellwig wrote:
On Wed, Jul 18, 2012 at 12:33:58PM -0500, tinguely@xxxxxxx wrote:
Sorry, I have been distracted away from this regression. This was previously
titled "xfs: synchronously write the superblock on unmount".

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
causes a panic if the write does not win the race.

The log write of the superblock is important for possible recovery, but a
second syncronous write of the same superblock seems redundant. Would just
waiting for the iodone() of the log write before tearing down the log be
enough?

This doesn't look beautiful, but I suspect there's no good way around
it.  Can you add your explanation from the reply on why xfs_buf_iowait
does not work here to the comment above the lock/unlock pair?

With that:

Reviewed-by: Christoph Hellwig<hch@xxxxxx>

Thank-you. I will repost with the same xfs_buf_lock() entry to xfs_quiesce_attr().

--Mark.

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