[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131119121843.GA5339@gmail.com>
Date: Tue, 19 Nov 2013 20:18:43 +0800
From: Zheng Liu <gnehzuil.liu@...il.com>
To: Dave Chinner <david@...morbit.com>
Cc: Christoph Hellwig <hch@...radead.org>, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org, xfs@....sgi.com
Subject: Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio
writes
On Tue, Nov 19, 2013 at 11:09:29PM +1100, Dave Chinner wrote:
> On Tue, Nov 19, 2013 at 07:51:22PM +0800, Zheng Liu wrote:
> > On Tue, Nov 19, 2013 at 03:18:26AM -0800, Christoph Hellwig wrote:
> > > On Tue, Nov 19, 2013 at 07:19:47PM +0800, Zheng Liu wrote:
> > > > Yes, I know that XFS has a shared/exclusive lock. I guess that is why
> > > > it can pass the test. But another question is why xfs fails when we do
> > > > some append dio writes with doing buffered read.
> > >
> > > Can you provide a test case for that issue?
> >
> > Simple. Reader just need to open this file without O_DIRECT flag. I
> > paste the full code snippet below. Please take care of this line:
> > readfd = open(argv[1], /*O_DIRECT|*/O_RDONLY, S_IRWXU);
> >
> > The result of this program on my own sand box looks like below:
> > encounter an error: offset 0
> ....
> > if (ret >= 0) {
> > for (j = 0; j < ret; j++) {
> > if (rbuf[i] != 'a') {
> > fprintf(stderr, "encounter an error: offset %ld\n",
> > i);
> > goto err;
>
> Should be checking rbuf[j], perhaps?
Oops, it's my fault. Yes. it should check rbuf[j].
Thanks,
- Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists