From: "Theodore Ts'o" <tytso@mit.edu>
To: fstests@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH] common: ext4 doesn't support O_DIRECT with encryption
Date: Tue, 28 Jun 2016 21:32:55 -0400 [thread overview]
Message-ID: <1467163975-11183-1-git-send-email-tytso@mit.edu> (raw)
Teach _require_odirect to skip the O_DIRECT tests if the ext4 mount
option "test_dummy_encryption" is enabled, since O_DIRECT doesen't
make sense when file system level encryption is enabled, and several
tests which use O_DIRECT --- ext4/301, ext4/304, generic/250 and
generic/252 --- fail when encryption is enabled.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
common/rc | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/common/rc b/common/rc
index adda940..003400d 100644
--- a/common/rc
+++ b/common/rc
@@ -1933,12 +1933,18 @@ _require_xfs_db_command()
# check that kernel and filesystem support direct I/O
_require_odirect()
{
- testfile=$TEST_DIR/$$.direct
- $XFS_IO_PROG -F -f -d -c "pwrite 0 20k" $testfile > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- _notrun "O_DIRECT is not supported"
- fi
- rm -f $testfile 2>&1 > /dev/null
+ if [ $FSTYP = "ext4" ] ; then
+ if echo "$MOUNT_OPTIONS" | grep -q "test_dummy_encryption"
+ then
+ _notrun "ext4 encryption doesn't support O_DIRECT"
+ fi
+ fi
+ testfile=$TEST_DIR/$$.direct
+ $XFS_IO_PROG -F -f -d -c "pwrite 0 20k" $testfile > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ _notrun "O_DIRECT is not supported"
+ fi
+ rm -f $testfile 2>&1 > /dev/null
}
# Check that a fs has enough free space (in 1024b blocks)
--
2.5.0
next reply other threads:[~2016-06-29 1:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 1:32 Theodore Ts'o [this message]
2016-06-29 9:39 ` [PATCH] common: ext4 doesn't support O_DIRECT with encryption Eryu Guan
2016-07-01 1:45 ` Dave Chinner
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=1467163975-11183-1-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=fstests@vger.kernel.org \
/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