public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
	"adilger@sun.com" <adilger@sun.com>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: fio test triggering bad data on ext4
Date: Fri, 18 Jun 2010 10:28:46 -0500	[thread overview]
Message-ID: <4C1B90AE.1050703@redhat.com> (raw)
In-Reply-To: <4C1B8D1F.3020002@fusionio.com>

Jens Axboe wrote:
> On 18/06/10 16.59, Eric Sandeen wrote:
>   
>> Eric Sandeen wrote:
>>     
>>> Jens Axboe wrote:
>>>       
>>>> Hi,
>>>>
>>>> I was writing a small fio job file to do writes and read verifies on a
>>>> device. It forks 32 processes, each writing randomly to 4 files with a
>>>> block size between 4k and 16k. When it has written 1024 of those blocks,
>>>> it'll verify the oldest 512 of them. Each block is checksummed for every
>>>> 512b. It uses libaio and O_DIRECT.
>>>>
>>>> It works on ext2 and btrfs. I haven't run it to completion yet, but they
>>>> survive 15-20 minutes just fine. ext4 doesn't even go a full minutes
>>>> before this triggers:
>>>>         
>>> Jens, can you try XFS too?  Since ext3 can't do direct IO to a hole,
>>> (and I'm not sure about btrfs in that regard), ext4 may be most similar
>>> to xfs's behavior on the test ... wondering how it fares.
>>>
>>> Thanks,
>>> -Eric
>>>       
>> Actually mingming had a patch for direct-io.c which may be related, I'll
>> test that out.
>>     
>
> OK, I'll try XFS tonight as well.
>
>
>   
I haven't been able to reproduce it on ext4 here, yet.

FWIW here's the patch from mingming:

When unaligned DIO writes, skip zero out the block if the buffer is marked
unwritten. That means there is an asynconous direct IO (append or fill the hole)
still pending.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
---
 fs/direct-io.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-git/fs/direct-io.c
===================================================================
--- linux-git.orig/fs/direct-io.c	2010-05-07 15:42:22.855033403 -0700
+++ linux-git/fs/direct-io.c	2010-05-07 15:44:17.695007770 -0700
@@ -740,7 +740,8 @@
 	struct page *page;
 
 	dio->start_zero_done = 1;
-	if (!dio->blkfactor || !buffer_new(&dio->map_bh))
+	if (!dio->blkfactor || !buffer_new(&dio->map_bh)
+	    || buffer_unwritten(&dio->map_bh))
 		return;
 
 	dio_blocks_per_fs_block = 1 << dio->blkfactor;



  reply	other threads:[~2010-06-18 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18  8:07 fio test triggering bad data on ext4 Jens Axboe
2010-06-18 14:02 ` Eric Sandeen
2010-06-18 14:59   ` Eric Sandeen
2010-06-18 15:13     ` Jens Axboe
2010-06-18 15:28       ` Eric Sandeen [this message]
2010-06-18 17:32         ` Jens Axboe
2010-06-18 18:04           ` Eric Sandeen
2010-06-18 18:14             ` Jens Axboe
2010-06-21 10:20               ` Jens Axboe
2010-06-18 17:36       ` Jens Axboe
2010-07-07 14:26 ` Eric Sandeen
2010-07-07 19:39   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2010-06-21  9:37 Frank Mehnert

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=4C1B90AE.1050703@redhat.com \
    --to=sandeen@redhat.com \
    --cc=adilger@sun.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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