| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio writes |
| From: | Zheng Liu <gnehzuil.liu@xxxxxxxxx> |
| Date: | Tue, 19 Nov 2013 20:18:43 +0800 |
| Cc: | Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Z+P53QBrLLYDq0aBPyiWdCh8A9NRtNSaLdl6kcXs+6A=; b=urjHJLeO1FoqS1X8ToThG0qtESTG1ke8QOQmdVCDIkDZQHPHoZVwbB1DBXZm0iVU18 aiy8A/gQ8UYn/w2lwo5KTnNBj18RR5tB3Tq67o89hyqkzgq3owwPkU3zSdAt2J0zBq05 wJWtqYam6lYABn0o1ypy1jb0qz3eo9wY+ESOwt3OayXBgObBt6FfKs/2Or8LQ5arxxmU kARRblDHwrJQ0Oy35IxKLww80g+vtxKar6BiIPHiXf6y2R+NdvDuycgt3t13zI1rSOlt 6j54mQjW6BoEWVENAEmyRoWp52OkQBvNoq063c3x/e9HB6XvFzJRdOLvtTQWXzVT7ZOd CdlQ== |
| In-reply-to: | <20131119120929.GO11434@dastard> |
| Mail-followup-to: | Dave Chinner <david@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| References: | <20131119095302.GA4534@xxxxxxxxx> <20131119102235.GA5010@xxxxxxxxxxxxx> <20131119104508.GA4630@xxxxxxxxx> <20131119110147.GA3323@xxxxxxxxxxxxx> <20131119111947.GA4782@xxxxxxxxx> <20131119111826.GA20485@xxxxxxxxxxxxx> <20131119115122.GC4782@xxxxxxxxx> <20131119120929.GO11434@dastard> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio writes, Dave Chinner |
|---|---|
| Next by Date: | Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio writes, Zheng Liu |
| Previous by Thread: | Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio writes, Dave Chinner |
| Next by Thread: | Re: [BUG] ext2/3/4: dio reads stale data when we do some append dio writes, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |