[PATCH v2] Make test 272 work for ext3

Jan Kara jack at suse.cz
Thu Aug 16 04:14:35 CDT 2012


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.

Thanks for Dave Chinner for suggesting a simpler way to fix the test.

Signed-off-by: Jan Kara <jack at suse.cz>
---
 272 |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/272 b/272
index 26dfa3b..7b142e2 100755
--- a/272
+++ b/272
@@ -32,6 +32,12 @@ tmp=/tmp/$$
 status=1	# failure is the default!
 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
+write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
+if [ $FSTYP = "ext3" ]; then
+	# ext3 doesn't support direct IO in journalling mode
+	write_opt_list="iflag=noatime conv=notrunc conv=fsync"
+fi
+
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
@@ -40,7 +46,6 @@ _workout()
 	echo ""
 	echo " Switch data journalling mode"
 	echo ""
-	write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
 	chattr_opt_list="+j -j +jS -j"
 	idx=0
 	#
-- 
1.7.1


--+QahgC5+KEYLbs62--



More information about the xfs mailing list