From: Eric Whitney Date: Wed, 10 Jan 2018 21:19:05 +0000 (-0500) Subject: common/rc: ext4 doesn't support O_DIRECT with data journaling X-Git-Tag: v2022.05.01~1709 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2931de473cc18a8f866fa0a08805d50ed0f4079b;p=users%2Fhch%2Fxfstests-dev.git common/rc: ext4 doesn't support O_DIRECT with data journaling Modify _require_odirect() to skip O_DIRECT tests if the ext4 mount option data=journal has been applied. Because ext4 disables its O_DIRECT support when in data journaling mode, no significant value is obtained by running these tests and they consume a significant amount of run time. Additionally, this change eliminates the need to triage false negative O_DIRECT test results caused by test problems, as has occurred from time to time. Signed-off-by: Eric Whitney Reviewed-by: Theodore Ts'o Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index d47c1dbe8..fa3b21507 100644 --- a/common/rc +++ b/common/rc @@ -2150,6 +2150,8 @@ _require_odirect() if [ $FSTYP = "ext4" ] ; then if echo "$MOUNT_OPTIONS" | grep -q "test_dummy_encryption"; then _notrun "ext4 encryption doesn't support O_DIRECT" + elif echo "$MOUNT_OPTIONS" | grep -q "data=journal"; then + _notrun "ext4 data journaling doesn't support O_DIRECT" fi fi testfile=$TEST_DIR/$$.direct