linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: xfs@oss.sgi.com
Cc: dmonakhov@openvz.org, linux-ext4@vger.kernel.org
Subject: Test 272 fails for ext3
Date: Thu, 16 Aug 2012 11:37:57 +0200	[thread overview]
Message-ID: <20120816093757.GA11519@quack.suse.cz> (raw)
In-Reply-To: <20120816092808.GA9057@quack.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

  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?

								Honza

PS: Sending again with correct list address. I'm sorry for unnecessary email.
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

[-- Attachment #2: 0001-Make-test-272-work-for-ext3.patch --]
[-- Type: text/x-patch, Size: 999 bytes --]

>From 529429c8497314ef956e470fdb9b94bfe797df69 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
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@suse.cz>
---
 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


  reply	other threads:[~2012-08-16  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  9:28 Test 272 fails for ext3 Jan Kara
2012-08-16  9:37 ` Jan Kara [this message]
2012-08-16 10:07   ` Dmitry Monakhov
2012-08-16 22:48   ` Dave Chinner
2012-08-20 16:22     ` Jan Kara
2012-08-20 21:06       ` Jan Kara
2012-08-20 22:49         ` Dave Chinner
2012-08-21  8:03           ` Jan Kara
2012-09-18 21:26             ` Ben Myers

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=20120816093757.GA11519@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=dmonakhov@openvz.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).