Skip to contentSkip to conversation

Test 272 fails for ext3

PATCH Jan Kara 4 participants 9 messages Aug 16, 2012 – Sep 18, 2012

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
Quoted 1 line

From 529429c8497314ef956e470fdb9b94bfe797df69 Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
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.

---
 272 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
272 +6 -0
index 26dfa3b..e39c52b 100755
@@ -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
Signature · 1 line
1.7.1
author
#1 lore raw

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.

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
Quoted 1 line

From 529429c8497314ef956e470fdb9b94bfe797df69 Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
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.

---
 272 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
272 +6 -0
index 26dfa3b..e39c52b 100755
@@ -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
Signature · 1 line
1.7.1
#2 lore raw

On Thu, 16 Aug 2012 11:37:57 +0200, Jan Kara <[email protected]> wrote:
Non-text part: multipart/mixed

Quoted 9 lines

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.

Quoted 41 lines

Honza

PS: Sending again with correct list address. I'm sorry for unnecessary email.

Signature · 15 lines
Jan Kara <[email protected]>
SUSE Labs, CR
From 529429c8497314ef956e470fdb9b94bfe797df69 Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
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 <[email protected]>
---
 272 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
272 +6 -0
index 26dfa3b..e39c52b 100755
@@ -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
Signature · 1 line
1.7.1
#3 lore raw
In reply to Jan Kara
Quoted 9 lines · Jan Kara

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?

# ext3 doesn't support direct IO in journalling mode
ext3_write_opt_list="iflag=noatime conv=notrunc conv=fsync"
ext4_write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"

if [ $FSTYP = "ext3" ]; then

	write_opt_list="$ext3_write_opt_list"
else
	write_opt_list="$ext4_write_opt_list"

fi

.....

Quoted 5 lines
272 +0 -0
index 26dfa3b..e39c52b 100755

272 _workout() · line 60

Quoted 9 lines
272 +6 -0
@@ -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

That only fixes one of the two places that does direct IO on a jounralled file. The above will fix both...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author
#4 lore raw
Quoted 16 lines · Dave Chinner
Quoted 9 lines · Jan Kara

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?

# ext3 doesn't support direct IO in journalling mode
ext3_write_opt_list="iflag=noatime conv=notrunc conv=fsync"
ext4_write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
Quoted 5 lines

if [ $FSTYP = "ext3" ]; then

	write_opt_list="$ext3_write_opt_list"
else
	write_opt_list="$ext4_write_opt_list"

fi

Yeah, this is probably simpler. Thanks for suggestion. BTW, ext4 also
does not support direct IO and data journalling but it silently falls back to buffered IO. Anyway new patch is attached.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
Quoted 1 line

From 563edb54e3f3a45b5c92ab21bbe41deacef0ae39 Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Thu, 16 Aug 2012 11:14:35 +0200
Subject: [PATCH v2] 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.

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

---
 272 |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
272 +6 -1
index 26dfa3b..7b142e2 100755
@@ -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
 	#
Signature · 1 line
1.7.1
author
#5 lore raw
Quoted 17 lines · Jan Kara
Quoted 16 lines · Dave Chinner
Quoted 9 lines · Jan Kara

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?

# ext3 doesn't support direct IO in journalling mode
ext3_write_opt_list="iflag=noatime conv=notrunc conv=fsync"
ext4_write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
Quoted 8 lines
Quoted 5 lines

if [ $FSTYP = "ext3" ]; then

	write_opt_list="$ext3_write_opt_list"
else
	write_opt_list="$ext4_write_opt_list"

fi

Yeah, this is probably simpler. Thanks for suggestion. BTW, ext4 also
does not support direct IO and data journalling but it silently falls back to buffered IO. Anyway new patch is attached.

Hum, after testing this I realized why I did the things the original way.
The test writes a message with title for each test so when direct IO tests are skipped outputs don't match.

After some thought I decided to change the test to output titles only to full output and keep compared output (almost) empty. Result is attached.

Honza

Quoted 1 line

From 170ff81c2ba12e0c7d30d21fa9401a459638e8eb Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Thu, 16 Aug 2012 11:14:35 +0200
Subject: [PATCH v3] 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.

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

---
 272     |   15 +++++++++------
 272.out |   36 +-----------------------------------
 2 files changed, 10 insertions(+), 41 deletions(-)
272 +9 -6
index 26dfa3b..21559ff 100755
@@ -32,15 +32,18 @@ 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
 _workout()
 {
-	echo ""
-	echo " Switch data journalling mode"
-	echo ""
-	write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
+	echo "Switch data journalling mode. Silence is golden."
 	chattr_opt_list="+j -j +jS -j"
 	idx=0
 	#
@@ -51,7 +54,7 @@ _workout()
 		do
 		    
 			echo "OP write_opt: $write_opt 4M, \
-chattr_opt: $chattr_opt"
+chattr_opt: $chattr_opt" >>$seq.full
 			dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
 				bs=1M count=4 $write_opt \
 				>> $seq.full 2>&1 || exit
@@ -69,7 +72,7 @@ chattr_opt: $chattr_opt"
 		do
 
 			echo "OP write_opt: $write_opt ENOSPC, \
-chattr_opt: $chattr_opt"
+chattr_opt: $chattr_opt" >>$seq.full
 			dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
 				bs=1M $write_opt >> $seq.full 2>&1
 			chattr $chattr_opt $SCRATCH_MNT/file.$idx \
272.out +1 -35
index cc687aa..a9eaf84 100644
@@ -1,37 +1,3 @@
 QA output created by 272
-
- Switch data journalling mode
-
-OP write_opt: iflag=noatime 4M, chattr_opt: +j
-OP write_opt: iflag=noatime 4M, chattr_opt: -j
-OP write_opt: iflag=noatime 4M, chattr_opt: +jS
-OP write_opt: iflag=noatime 4M, chattr_opt: -j
-OP write_opt: conv=notrunc 4M, chattr_opt: +j
-OP write_opt: conv=notrunc 4M, chattr_opt: -j
-OP write_opt: conv=notrunc 4M, chattr_opt: +jS
-OP write_opt: conv=notrunc 4M, chattr_opt: -j
-OP write_opt: conv=fsync 4M, chattr_opt: +j
-OP write_opt: conv=fsync 4M, chattr_opt: -j
-OP write_opt: conv=fsync 4M, chattr_opt: +jS
-OP write_opt: conv=fsync 4M, chattr_opt: -j
-OP write_opt: oflag=direct 4M, chattr_opt: +j
-OP write_opt: oflag=direct 4M, chattr_opt: -j
-OP write_opt: oflag=direct 4M, chattr_opt: +jS
-OP write_opt: oflag=direct 4M, chattr_opt: -j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: +j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: -j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: +jS
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: -j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: +j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: -j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: +jS
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: -j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: +j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: -j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: +jS
-OP write_opt: conv=fsync ENOSPC, chattr_opt: -j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: +j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: -j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: +jS
-OP write_opt: oflag=direct ENOSPC, chattr_opt: -j
+Switch data journalling mode. Silence is golden.
 Check filesystem
Signature · 1 line
1.7.1
Reviewed-by
#6 lore raw
Quoted 32 lines · Jan Kara
Quoted 17 lines · Jan Kara
Quoted 16 lines · Dave Chinner
Quoted 9 lines · Jan Kara

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?

# ext3 doesn't support direct IO in journalling mode
ext3_write_opt_list="iflag=noatime conv=notrunc conv=fsync"
ext4_write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
Quoted 8 lines
Quoted 5 lines

if [ $FSTYP = "ext3" ]; then

	write_opt_list="$ext3_write_opt_list"
else
	write_opt_list="$ext4_write_opt_list"

fi

Yeah, this is probably simpler. Thanks for suggestion. BTW, ext4 also
does not support direct IO and data journalling but it silently falls back to buffered IO. Anyway new patch is attached.

Hum, after testing this I realized why I did the things the original way.
The test writes a message with title for each test so when direct IO tests are skipped outputs don't match.

After some thought I decided to change the test to output titles only to full output and keep compared output (almost) empty. Result is attached.

....

272 tmp=/tmp/$$ · line 39

Quoted 11 lines
272 +5 -0
@@ -32,15 +32,18 @@ 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

Seems like asking for trouble duplicating the common options.

# ext3 doesn't support direct IO in journalling mode
write_opt_list="iflag=noatime conv=notrunc conv=fsync
[ $FSTYP = "ext4" ] && write_opt_list="$write_opt_list oflag=direct"

Otherwise looks fine.

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
author Reviewed-by Dave Chinner
#7 lore raw
Quoted 16 lines · Dave Chinner

On Mon, Aug 20, 2012 at 11:06:38PM +0200, Jan Kara wrote:
....

272 tmp=/tmp/$$ · line 39

Quoted 11 lines
272 +5 -0
@@ -32,15 +32,18 @@ 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

Seems like asking for trouble duplicating the common options.

Quoted 7 lines
# ext3 doesn't support direct IO in journalling mode
write_opt_list="iflag=noatime conv=notrunc conv=fsync
[ $FSTYP = "ext4" ] && write_opt_list="$write_opt_list oflag=direct"

Otherwise looks fine.

OK, I've updated the test as you suggested. Result is attached.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
Quoted 1 line

From ffae802de298576f701a7cc0e0bfd2b33c6be36e Mon Sep 17 00:00:00 2001

From: Jan Kara <[email protected]>
Date: Thu, 16 Aug 2012 11:14:35 +0200
Subject: [PATCH v4] 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.

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

---
 272     |   14 ++++++++------
 272.out |   36 +-----------------------------------
 2 files changed, 9 insertions(+), 41 deletions(-)
272 +8 -6
index 26dfa3b..c7f1efc 100755
@@ -32,15 +32,17 @@ tmp=/tmp/$$
 status=1	# failure is the default!
 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
+# ext3 doesn't support direct IO in journalling mode
+write_opt_list="iflag=noatime conv=notrunc conv=fsync"
+# For filesystems that can handle it, add also direct IO test
+[ $FSTYP = "ext4" ] && write_opt_list="$write_opt_list oflag=direct"
+
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 _workout()
 {
-	echo ""
-	echo " Switch data journalling mode"
-	echo ""
-	write_opt_list="iflag=noatime conv=notrunc conv=fsync oflag=direct"
+	echo "Switch data journalling mode. Silence is golden."
 	chattr_opt_list="+j -j +jS -j"
 	idx=0
 	#
@@ -51,7 +53,7 @@ _workout()
 		do
 		    
 			echo "OP write_opt: $write_opt 4M, \
-chattr_opt: $chattr_opt"
+chattr_opt: $chattr_opt" >>$seq.full
 			dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
 				bs=1M count=4 $write_opt \
 				>> $seq.full 2>&1 || exit
@@ -69,7 +71,7 @@ chattr_opt: $chattr_opt"
 		do
 
 			echo "OP write_opt: $write_opt ENOSPC, \
-chattr_opt: $chattr_opt"
+chattr_opt: $chattr_opt" >>$seq.full
 			dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
 				bs=1M $write_opt >> $seq.full 2>&1
 			chattr $chattr_opt $SCRATCH_MNT/file.$idx \
272.out +1 -35
index cc687aa..a9eaf84 100644
@@ -1,37 +1,3 @@
 QA output created by 272
-
- Switch data journalling mode
-
-OP write_opt: iflag=noatime 4M, chattr_opt: +j
-OP write_opt: iflag=noatime 4M, chattr_opt: -j
-OP write_opt: iflag=noatime 4M, chattr_opt: +jS
-OP write_opt: iflag=noatime 4M, chattr_opt: -j
-OP write_opt: conv=notrunc 4M, chattr_opt: +j
-OP write_opt: conv=notrunc 4M, chattr_opt: -j
-OP write_opt: conv=notrunc 4M, chattr_opt: +jS
-OP write_opt: conv=notrunc 4M, chattr_opt: -j
-OP write_opt: conv=fsync 4M, chattr_opt: +j
-OP write_opt: conv=fsync 4M, chattr_opt: -j
-OP write_opt: conv=fsync 4M, chattr_opt: +jS
-OP write_opt: conv=fsync 4M, chattr_opt: -j
-OP write_opt: oflag=direct 4M, chattr_opt: +j
-OP write_opt: oflag=direct 4M, chattr_opt: -j
-OP write_opt: oflag=direct 4M, chattr_opt: +jS
-OP write_opt: oflag=direct 4M, chattr_opt: -j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: +j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: -j
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: +jS
-OP write_opt: iflag=noatime ENOSPC, chattr_opt: -j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: +j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: -j
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: +jS
-OP write_opt: conv=notrunc ENOSPC, chattr_opt: -j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: +j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: -j
-OP write_opt: conv=fsync ENOSPC, chattr_opt: +jS
-OP write_opt: conv=fsync ENOSPC, chattr_opt: -j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: +j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: -j
-OP write_opt: oflag=direct ENOSPC, chattr_opt: +jS
-OP write_opt: oflag=direct ENOSPC, chattr_opt: -j
+Switch data journalling mode. Silence is golden.
 Check filesystem
Signature · 1 line
1.7.1
#8 lore raw
Quoted 17 lines · Jan Kara
Quoted 16 lines · Dave Chinner

On Mon, Aug 20, 2012 at 11:06:38PM +0200, Jan Kara wrote:
....

272 tmp=/tmp/$$ · line 39

Quoted 11 lines
272 +5 -0
@@ -32,15 +32,18 @@ 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

Seems like asking for trouble duplicating the common options.

Quoted 8 lines
Quoted 7 lines
# ext3 doesn't support direct IO in journalling mode
write_opt_list="iflag=noatime conv=notrunc conv=fsync
[ $FSTYP = "ext4" ] && write_opt_list="$write_opt_list oflag=direct"

Otherwise looks fine.

OK, I've updated the test as you suggested. Result is attached.

Committed to git://oss.sgi.com/xfs/cmds/xfstests.git, master branch.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs