xfs
[Top] [All Lists]

review: use correct buffer flags when reading superblock

To: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Subject: review: use correct buffer flags when reading superblock
From: Lachlan McIlroy <lachlan@xxxxxxx>
Date: Wed, 10 Oct 2007 18:37:47 +1000
Reply-to: lachlan@xxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.4 (X11/20070604)
When reading the superblock during log recovery we are not setting
the correct buffer flags.  Specifically we are not turning off flags
we do not need such as XBF_ASYNC that is causing the synchronous
xfs_iowait() to hang.  We should also turn off XBF_WRITE and remove
the buffer from the delay write queue just to be safe.

Lachlan
--- fs/xfs/xfs_log_recover.c_1.329      2007-10-10 15:59:18.000000000 +1000
+++ fs/xfs/xfs_log_recover.c    2007-10-10 16:03:08.000000000 +1000
@@ -3824,7 +3824,10 @@ xlog_do_recover(
         */
        bp = xfs_getsb(log->l_mp, 0);
        XFS_BUF_UNDONE(bp);
+       XFS_BUF_UNWRITE(bp);
+       XFS_BUF_UNDELAYWRITE(bp);
        XFS_BUF_READ(bp);
+       XFS_BUF_UNASYNC(bp);
        xfsbdstrat(log->l_mp, bp);
        if ((error = xfs_iowait(bp))) {
                xfs_ioerror_alert("xlog_do_recover",
<Prev in Thread] Current Thread [Next in Thread>