xfs
[Top] [All Lists]

Re: Test 272 fails for ext3

To: Jan Kara <jack@xxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: Test 272 fails for ext3
From: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
Date: Thu, 16 Aug 2012 14:07:12 +0400
Cc: linux-ext4@xxxxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=CaorcLj7lD1uAE3t4nofWVbdJdHhUSPr8advkrY8jnA=; b=ACg/VfSvQSD5ahbCNqdNNnctz66p9OPQVKKibrwrAS4lh6wzIOHBgPvvY6JUr874nl Fc3TU/fNZlu8Tlc1RkWyiUApkvuEVp709aVNDjp9DwXIHJPHnCZRjTaX/asEzvxIMR6y dLkUsc/7/tkGCUNVS3Mo4DyLgq8tQM1O+Bri6cG3Ut0q49w4bOdZ2aPmylicAG8wSPhY lC/h6PGRpsjrBV4VRGtz4A5lEo8qfbgs6Ka3NTARModrRuhnuISgllbKMZJaua7XNbhX gmWHFjIfJLuzHk0DxUz2hXJfDLXmBFo5nebrzT88IVVC7XGprbvjXZ7cQtlG5Iieb0cO bnzQ==
In-reply-to: <20120816093757.GA11519@xxxxxxxxxxxxx>
References: <20120816092808.GA9057@xxxxxxxxxxxxx> <20120816093757.GA11519@xxxxxxxxxxxxx>
Sender: Dmitry Monakhov <rjevskiy@xxxxxxxxx>
User-agent: Notmuch/0.6.1 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-redhat-linux-gnu)
On Thu, 16 Aug 2012 11:37:57 +0200, Jan Kara <jack@xxxxxxx> wrote:
Non-text part: multipart/mixed
>   Hello,
> 
>   I was looking into why test 272 from xfstests fails for ext3 and the
> reason is that ext3 does not support direct IO to file with enabled data
> journalling (open returns EINVAL because ->direct_IO callback is not
> specified). So I was thinking how to accomodate this fact in the test -
> the best I found was to just check using xfs_io whether O_DIRECT open
> succeeds and perform the test only in that case. Attached patch does this
> or do people have other ideas?
Looks reasonable
ACK.
> 
>                                                               Honza
> 
> PS: Sending again with correct list address. I'm sorry for unnecessary email.
> -- 
> Jan Kara <jack@xxxxxxx>
> SUSE Labs, CR
> From 529429c8497314ef956e470fdb9b94bfe797df69 Mon Sep 17 00:00:00 2001
> From: Jan Kara <jack@xxxxxxx>
> Date: Thu, 16 Aug 2012 11:14:35 +0200
> Subject: [PATCH] Make test 272 work for ext3
> 
> ext3 does not support direct IO for files with data journalling. This
> confuses test 272. Make the test check whether open succeeds and perform
> the writing only if it does.
> 
> Signed-off-by: Jan Kara <jack@xxxxxxx>
> ---
>  272 |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/272 b/272
> index 26dfa3b..e39c52b 100755
> --- a/272
> +++ b/272
> @@ -52,6 +52,12 @@ _workout()
>                   
>                       echo "OP write_opt: $write_opt 4M, \
>  chattr_opt: $chattr_opt"
> +                     if [ "$write_opt" = "oflag=direct" ]; then
> +                             # Some filesystems don't support direct IO
> +                             # in some cases, check for that
> +                             xfs_io -F -d -f -c "" $SCRATCH_MNT/file.$idx \
> +                                     >> $seq.full 2>&1 || continue
> +                     fi
>                       dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
>                               bs=1M count=4 $write_opt \
>                               >> $seq.full 2>&1 || exit
> -- 
> 1.7.1
> 

<Prev in Thread] Current Thread [Next in Thread>