From: bpm@sgi.com
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com, aelder@sgi.com
Subject: Re: [PATCH] xfs: only SetPageUptodate if all buffers are uptodate
Date: Wed, 20 Apr 2011 09:57:22 -0500 [thread overview]
Message-ID: <20110420145722.GB29759@sgi.com> (raw)
In-Reply-To: <20110420103521.GA20510@infradead.org>
Hey Christoph,
On Wed, Apr 20, 2011 at 06:35:21AM -0400, Christoph Hellwig wrote:
> On Tue, Apr 19, 2011 at 06:40:28AM -0500, Ben Myers wrote:
> > xfs_vm_writepage and xfs_page_convert set a page uptodate if it is determined
> > that all of the buffer_heads attached to that page are uptodate.
> >
> > Currently we use the flag variable 'uptodate'. The flag is initially set = 1
> > and it is cleared if a !buffer_uptodate buffer is encountered. In addition we
> > check that bh == head in order to ensure that all of the buffer_heads have been
> > checked. However, it is possible to break out of the buffer_head loop early
> > having processed only the first buffer. This leaves uptodate == 1 and bh ==
> > head, so the uptodate bit can be set on a page even if not all of the buffers
> > have been checked. This can lead to data corruption on platforms with > 1
> > buffer per page.
>
> Dou have a testcase to reproduce this issue?
Wish I did. The test case that discovered this only applies to CXFS. I
would have liked to post a test case for XFS but decided that this has
been on my TODO list for too long already. Looks to me like it has to
be related to the inode size, so you quit probing buffers after the
first. Maybe some discussion will ring some bells for somebody.
-Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-04-20 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 11:40 [PATCH] xfs: only SetPageUptodate if all buffers are uptodate Ben Myers
2011-04-20 10:35 ` Christoph Hellwig
2011-04-20 14:57 ` bpm [this message]
2011-04-20 15:36 ` Christoph Hellwig
2011-06-23 5:08 ` Dave Chinner
2011-06-23 6:09 ` Dave Chinner
2011-06-23 10:35 ` Dave Chinner
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=20110420145722.GB29759@sgi.com \
--to=bpm@sgi.com \
--cc=aelder@sgi.com \
--cc=hch@infradead.org \
--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