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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux