Skip to content

Commit

Permalink
xfs: fix bad dquot buffer size in log recovery readahead
Browse files Browse the repository at this point in the history
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: 548

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
place.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Dave Chinner authored and Ben Myers committed Aug 29, 2013
1 parent 84a5b73 commit 0f0d334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f0d334

Please sign in to comment.