All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 3/3] common/rc: relax xfs swapfile support checks
Date: Tue, 27 Apr 2021 21:09:47 -0700	[thread overview]
Message-ID: <161958298729.3452499.11374046947109958849.stgit@magnolia> (raw)
In-Reply-To: <161958296906.3452499.12678290296714187590.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

In commit 725feeff, I forgot that xfs has *not* always supported all
swap file configurations -- the bmap swapfile activation prior to the
introduction of iomap_swapfile_activate did not permit the use of
unwritten extents in the swap file.  Therefore, kick xfs out of the
always-supported list.

Fixes: 725feeff ("common/rc: swapon should not fail for given FS in _require_scratch_swapfile()")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/rc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/common/rc b/common/rc
index 429cc24d..7882355a 100644
--- a/common/rc
+++ b/common/rc
@@ -2494,10 +2494,10 @@ _require_scratch_swapfile()
 	statx_attr="$($XFS_IO_PROG -c 'statx -r' $SCRATCH_MNT/swap 2>/dev/null | grep 'stat.attributes = ' | awk '{print $3}')"
 	test "$((statx_attr & 0x200000))" -gt 0 && _notrun "swapfiles not supported on DAX"
 
-	# ext* and xfs have supported all variants of swap files since their
+	# ext* has supported all variants of swap files since their
 	# introduction, so swapon should not fail.
 	case "$FSTYP" in
-	ext2|ext3|ext4|xfs)
+	ext2|ext3|ext4)
 		if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then
 			_scratch_unmount
 			_fail "swapon failed for $FSTYP"


  parent reply	other threads:[~2021-04-28  4:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  4:09 [PATCHSET 0/3] fstests: fix swapfile tests Darrick J. Wong
2021-04-28  4:09 ` [PATCH 1/3] xfs/419: remove irrelevant swapfile test Darrick J. Wong
2021-04-28 18:04   ` Brian Foster
2021-04-28  4:09 ` [PATCH 2/3] rc: check dax mode in _require_scratch_swapfile Darrick J. Wong
2021-04-28  4:11   ` Darrick J. Wong
2021-04-28 18:04   ` Brian Foster
2021-04-28  4:09 ` Darrick J. Wong [this message]
2021-04-28 18:04   ` [PATCH 3/3] common/rc: relax xfs swapfile support checks Brian Foster

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=161958298729.3452499.11374046947109958849.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.