[Top] [All Lists]

[PATCH] xfs: fix bad dquot buffer size in log recovery readahead

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfs: fix bad dquot buffer size in log recovery readahead
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 27 Aug 2013 13:25:43 +1000
Delivered-to: xfs@xxxxxxxxxxx
From: Dave Chinner <dchinner@xxxxxxxxxx>

xfstests xfs/087 fails 100% reliably with this assert:

XFS (vdb): Mounting Filesystem
XFS (vdb): Starting recovery (logdev: internal)
XFS: Assertion failed: bp->b_flags & XBF_STALE, file: fs/xfs/xfs_buf.c, line: 

while trying to read a dquot buffer in xlog_recover_dquot_ra_pass2().

The issue is that the buffer length to read that is passed to
xfs_buf_readahead is in units of filesystem blocks, not disk blocks.
(i.e. FSB, not daddr). Fix it but putting the correct conversion in

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
 fs/xfs/xfs_log_recover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index ac9c18b..769c4a1 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3202,7 +3202,7 @@ xlog_recover_dquot_ra_pass2(
        ASSERT(dq_f->qlf_len == 1);
        xfs_buf_readahead(mp->m_ddev_targp, dq_f->qlf_blkno,
-                               dq_f->qlf_len, NULL);
+                         XFS_FSB_TO_BB(mp, dq_f->qlf_len), NULL);
 STATIC void

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