|To:||Dave Chinner <david@xxxxxxxxxxxxx>|
|Subject:||Re: [RFC] xfs: wait for the write of the superblock on unmount|
|From:||Mark Tinguely <tinguely@xxxxxxx>|
|Date:||Fri, 20 Jul 2012 08:21:59 -0500|
|References:||<20120717215957.855744999@xxxxxxxxxxxxxxx> <20120718220003.396849822@xxxxxxxxxxxxxxx> <20120719015809.GC23387@dastard>|
|User-agent:||Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0|
On 07/18/12 20:58, Dave Chinner 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?Yes. i.e. something like: /* * The superblock buffer is uncached, so xfs_wait_buftarg() * will not wait for it. Hence we need to explicitly wait * for IO completion on the superblock to occur here. */ error = xfs_buf_iowait(mp->m_sb_bp); if (error) AAAAIEEEE! This fix is also needed in xfs_quiesce_attr() for the freeze and ro,remount cases as well. Cheers, Dave.
Thanks for the feedback.I chose the ugly lock to block on the superblock buffer because it has XBF_ASYNC set at that point and won't go through the complete() patch. I will look at turning the XBF_ASYNC flag off and wait on a xfs_buf_iowait().
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: Re: [PATCH] Prefix IO_XX flags with XFS_IO_XX to avoid namespace colision., Rich Johnston|
|Next by Date:||Re: [PATCH v4] xfs: probe data buffer from page cache for unwritten extents, Mark Tinguely|
|Previous by Thread:||Re: [RFC] xfs: wait for the write of the superblock on unmount, Dave Chinner|
|Next by Thread:||Re: [RFC] xfs: wait for the write of the superblock on unmount, Mark Tinguely|
|Indexes:||[Date] [Thread] [Top] [All Lists]|