[PATCH 3/3] common/rc: relax xfs swapfile support checks

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Darrick J. Wong <djwong@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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"




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux