All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs-oss <xfs@oss.sgi.com>, ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] xfstests 240: test non-aligned AIO hole-filling
Date: Thu, 22 Jul 2010 22:32:29 -0500	[thread overview]
Message-ID: <4C490D4D.603@redhat.com> (raw)
In-Reply-To: <20100723024938.GD32635@dastard>

Dave Chinner wrote:

> On Thu, Jul 22, 2010 at 02:05:26PM -0500, Eric Sandeen wrote:
>   
>> This replicates file corruption we've seen with qemu-kvm when
>> we use if=virtio,cache=none,aio=native for IO to a sparse
>> ext4- or xfs-hosted file, and the partitions/filesystems
>> within that file image are not block-aligned.  (think sector
>> 63 here...)  This results in AIO IOs not aligned to the
>> filesystem blocks.
>>
>> This test modifies aiodio_sparse2.c to add an option to start
>> the file IO at an offset.
>>
>> When we do 4k writes to a 16k file in 2 threads, starting
>> at offset 512, we get 0s interspersed in the file where they
>> should not be:
>>
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
>> *
>> 00001000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00001200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
>> ....
>>
>> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
>>     
>
> looks good - it needs to remove the $TEST_DIR/aiodio_sparse file
> before the test starts, though, so that repeated tests fail
> correctly. Otherwise:
>
>   
hm, but:

+rm -f "$TEST_DIR/aiodio_sparse*"
+
+# 2 threads, 4k writes, 16k filesize, stride throug file by 4k, start at 512 offset
+$here/src/aio-dio-regress/aiodio_sparse2 -i 2 -w 4k -s 16k -n 4k -o 512 "$TEST_DIR/aiodio_sparse"

It does remove it ... no?


> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
>   
thanks

> Also, Eric, can you run this proof-of-concept test branch (on top of
> the current XFS for-2.6.36 branch) and see if QEMU is happy with it?
> It passes this test on my machine....
>
>   
Absolutely, thanks!

-Eric


WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests 240: test non-aligned AIO hole-filling
Date: Thu, 22 Jul 2010 22:32:29 -0500	[thread overview]
Message-ID: <4C490D4D.603@redhat.com> (raw)
In-Reply-To: <20100723024938.GD32635@dastard>

Dave Chinner wrote:

> On Thu, Jul 22, 2010 at 02:05:26PM -0500, Eric Sandeen wrote:
>   
>> This replicates file corruption we've seen with qemu-kvm when
>> we use if=virtio,cache=none,aio=native for IO to a sparse
>> ext4- or xfs-hosted file, and the partitions/filesystems
>> within that file image are not block-aligned.  (think sector
>> 63 here...)  This results in AIO IOs not aligned to the
>> filesystem blocks.
>>
>> This test modifies aiodio_sparse2.c to add an option to start
>> the file IO at an offset.
>>
>> When we do 4k writes to a 16k file in 2 threads, starting
>> at offset 512, we get 0s interspersed in the file where they
>> should not be:
>>
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
>> *
>> 00001000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00001200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
>> ....
>>
>> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
>>     
>
> looks good - it needs to remove the $TEST_DIR/aiodio_sparse file
> before the test starts, though, so that repeated tests fail
> correctly. Otherwise:
>
>   
hm, but:

+rm -f "$TEST_DIR/aiodio_sparse*"
+
+# 2 threads, 4k writes, 16k filesize, stride throug file by 4k, start at 512 offset
+$here/src/aio-dio-regress/aiodio_sparse2 -i 2 -w 4k -s 16k -n 4k -o 512 "$TEST_DIR/aiodio_sparse"

It does remove it ... no?


> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
>   
thanks

> Also, Eric, can you run this proof-of-concept test branch (on top of
> the current XFS for-2.6.36 branch) and see if QEMU is happy with it?
> It passes this test on my machine....
>
>   
Absolutely, thanks!

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2010-07-23  3:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 19:05 [PATCH] xfstests 240: test non-aligned AIO hole-filling Eric Sandeen
2010-07-22 19:05 ` Eric Sandeen
2010-07-23  2:49 ` Dave Chinner
2010-07-23  2:49   ` Dave Chinner
2010-07-23  3:32   ` Eric Sandeen [this message]
2010-07-23  3:32     ` Eric Sandeen
2010-07-23  3:37     ` Eric Sandeen
2010-07-23  3:37       ` Eric Sandeen
2010-07-23  3:58     ` Dave Chinner
2010-07-23  3:58       ` Dave Chinner
2010-07-23 10:12   ` Dave Chinner
2010-07-23 10:12     ` 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=4C490D4D.603@redhat.com \
    --to=sandeen@redhat.com \
    --cc=david@fromorbit.com \
    --cc=linux-ext4@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.