From: Christoph Hellwig <hch@infradead.org>
To: Andy Poling <andy@realbig.com>
Cc: John Quigley <jquigley@cleversafe.com>, xfs@oss.sgi.com
Subject: Re: Wrapped journal record corruption on read at recovery - patch attached (was Re: XFS corruption with failover)
Date: Tue, 13 Oct 2009 19:33:24 -0400 [thread overview]
Message-ID: <20091013233324.GA28942@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.00.0910131342440.11546@andydesk>
Thanks Andy,
after starting over the code for over half an hour I think both
your analysis and the patch are correct.
- bufaddr = XFS_BUF_PTR(hbp);
+ if (offset)
+ bufaddr = offset;
+ else
+ bufaddr = XFS_BUF_PTR(hbp);
However the way this is written is a bit confusing. Probably less
confusing than some of the surrounding code, but it adds up.
We calculate the offset for one case above, and then after we're done
with the reading that never touches offset we calculate it if we don't
have it.
So this at very least needs a big comment describing it, or even better
moving up the xlog_align call so that we can simply always use
offset directly, which could also get rid of the now superflous bufaddr
variable by always using offset.
Exactly the same also applies for the second use.
Anyway, thanks a lot again and if you can fix this up I'd welcome it,
otherwise I'll do it once I get some time.
I suspect we might even be able to come up with a small enough testcase
for this for xfsqa, we just need to make sure logs are aligned and then
find a good enough heuristic to reproduce log wrapping.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-10-13 23:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.0.1255458988.141519.xfs@oss.sgi.com>
2009-10-13 19:26 ` Wrapped journal record corruption on read at recovery - patch attached (was Re: XFS corruption with failover) Andy Poling
2009-10-13 23:33 ` Christoph Hellwig [this message]
2009-10-14 0:29 ` Andy Poling
2009-10-14 13:20 ` Christoph Hellwig
2009-10-14 16:43 ` Andy Poling
2009-10-16 0:36 ` Andy Poling
2009-10-16 6:00 ` Christoph Hellwig
2009-11-03 17:26 ` [PATCH] xfs: Wrapped journal record corruption on read at recovery Alex Elder
2009-11-03 19:15 ` Alex Elder
2009-11-09 18:04 ` Alex Elder
2009-11-09 18:06 ` Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091013233324.GA28942@infradead.org \
--to=hch@infradead.org \
--cc=andy@realbig.com \
--cc=jquigley@cleversafe.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox