From: Eric Biggers Date: Thu, 24 Oct 2019 20:45:29 +0000 (-0700) Subject: common/rc: skip encrypted direct I/O tests on f2fs X-Git-Tag: v2022.05.01~982 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f198f0647dc8cd15495df2b7b744689fdb081dcf;p=xfstests-dev.git common/rc: skip encrypted direct I/O tests on f2fs Skip the O_DIRECT tests on f2fs when the test_dummy_encryption mount option is given, for the same reason as given for ext4 in commit 9b154b26e4a1 ("common/rc: ext4 doesn't support O_DIRECT with encryption"). Signed-off-by: Eric Biggers Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index 2cb041af..a2a28f32 100644 --- a/common/rc +++ b/common/rc @@ -2224,10 +2224,13 @@ _require_xfs_io_command() # check that kernel and filesystem support direct I/O _require_odirect() { - if [ $FSTYP = "ext4" ] ; then + if [ $FSTYP = "ext4" ] || [ $FSTYP = "f2fs" ] ; 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 "$FSTYP encryption doesn't support O_DIRECT" + fi + fi + if [ $FSTYP = "ext4" ] ; then + if echo "$MOUNT_OPTIONS" | grep -q "data=journal"; then _notrun "ext4 data journaling doesn't support O_DIRECT" fi fi