public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix bad dquot buffer size in log recovery readahead
@ 2013-08-27  3:25 Dave Chinner
  2013-08-27 21:45 ` Ben Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2013-08-27  3:25 UTC (permalink / raw)
  To: xfs

From: Dave Chinner <dchinner@redhat.com>

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>
---
 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
-- 
1.8.3.2

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix bad dquot buffer size in log recovery readahead
  2013-08-27  3:25 [PATCH] xfs: fix bad dquot buffer size in log recovery readahead Dave Chinner
@ 2013-08-27 21:45 ` Ben Myers
  2013-08-30 18:38   ` Ben Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Myers @ 2013-08-27 21:45 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Tue, Aug 27, 2013 at 01:25:43PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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>

Looks good.

Reviewed-by: Ben Myers <bpm@sgi.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix bad dquot buffer size in log recovery readahead
  2013-08-27 21:45 ` Ben Myers
@ 2013-08-30 18:38   ` Ben Myers
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Myers @ 2013-08-30 18:38 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Tue, Aug 27, 2013 at 04:45:34PM -0500, Ben Myers wrote:
> On Tue, Aug 27, 2013 at 01:25:43PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > 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>
> 
> Looks good.
> 
> Reviewed-by: Ben Myers <bpm@sgi.com>

Also applied this one...

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-30 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  3:25 [PATCH] xfs: fix bad dquot buffer size in log recovery readahead Dave Chinner
2013-08-27 21:45 ` Ben Myers
2013-08-30 18:38   ` Ben Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox