From: Eryu Guan <eguan@redhat.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common: ext4 doesn't support O_DIRECT with encryption
Date: Wed, 29 Jun 2016 17:39:21 +0800 [thread overview]
Message-ID: <20160629093921.GK23649@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1467163975-11183-1-git-send-email-tytso@mit.edu>
On Tue, Jun 28, 2016 at 09:32:55PM -0400, Theodore Ts'o wrote:
> 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
I moved 'then' to the end of above line (if ....; then) and queued it up
Reviewed-by: Eryu Guan <eguan@redhat.com>
> + _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
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-29 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 1:32 [PATCH] common: ext4 doesn't support O_DIRECT with encryption Theodore Ts'o
2016-06-29 9:39 ` Eryu Guan [this message]
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=20160629093921.GK23649@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
/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