fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: xifeng@redhat.com
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v1] common/rc: not run swapfile test for DAX
Date: Sat, 17 Apr 2021 09:54:58 -0700	[thread overview]
Message-ID: <20210417165458.GA3122235@magnolia> (raw)
In-Reply-To: <20210417164655.64065-1-xifeng@redhat.com>

On Sat, Apr 17, 2021 at 12:46:55PM -0400, xifeng@redhat.com wrote:
> From: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
> 
> DAX doesn't support swapfile. Without this patch,
> _require_scratch_swapfile always returns fail for fsdax. Now
> change to notrun.
> 
> Signed-off-by: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>

Who?

> ---
>  common/rc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 23f86ce6..d02b9f72 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2384,7 +2384,11 @@ _require_scratch_swapfile()
>  	ext2|ext3|ext4|xfs)
>  		if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then
>  			_scratch_unmount
> -			_fail "swapon failed for $FSTYP"
> +			if _normalize_mount_options | egrep -q "dax(=always| |$)"; then

Doesn't the STATX_ATTR_DAX test above take care of this?

--D

> +				_notrun "swapfiles are not supported"
> +			else
> +				_fail "swapon failed for $FSTYP"
> +			fi
>  		fi
>  		;;
>  	*)
> -- 
> 2.27.0
> 

  reply	other threads:[~2021-04-17 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 16:46 [PATCH v1] common/rc: not run swapfile test for DAX xifeng
2021-04-17 16:54 ` Darrick J. Wong [this message]
2021-04-23 12:59   ` Xiaoli Feng

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=20210417165458.GA3122235@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=xifeng@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).