linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
@ 2021-06-04 12:26 Anand Jain
  2021-06-06 13:59 ` Eryu Guan
  2021-06-07 12:08 ` [PATCH 0/2 v2] fstests: fix _scratch_mkfs_blocksized Anand Jain
  0 siblings, 2 replies; 6+ messages in thread
From: Anand Jain @ 2021-06-04 12:26 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, g.btrfs, quwenruo.btrfs

When btrfs supports sectorsize != pagesize it can run these test cases
now,
generic/205 generic/206 generic/216 generic/217 generic/218 generic/220
generic/222 generic/227 generic/229 generic/238

This change is backward compatible for kernels without non pagesize
sectorsize support.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
RFC->v1:
  Fix path to the supported_sectorsizes path check if the file exists.
  Grep the word.

 common/rc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/common/rc b/common/rc
index 919028eff41c..baa994e33553 100644
--- a/common/rc
+++ b/common/rc
@@ -1121,6 +1121,15 @@ _scratch_mkfs_blocksized()
     fi
 
     case $FSTYP in
+    btrfs)
+	test -f /sys/fs/btrfs/features/supported_sectorsizes || \
+		_notrun "Subpage sectorsize support is not found in $FSTYP"
+
+	grep -q \\b$blocksize\\b /sys/fs/btrfs/features/supported_sectorsizes || \
+		_notrun "$FSTYP does not support sectorsize=$blocksize yet"
+
+	_scratch_mkfs $MKFS_OPTIONS --sectorsize=$blocksize
+	;;
     xfs)
 	_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
 	;;
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-07 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-04 12:26 [PATCH] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
2021-06-06 13:59 ` Eryu Guan
2021-06-07 11:54   ` Anand Jain
2021-06-07 12:08 ` [PATCH 0/2 v2] fstests: fix _scratch_mkfs_blocksized Anand Jain
2021-06-07 12:08   ` [PATCH 1/2 v2] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
2021-06-07 12:08   ` [PATCH 2/2 v2] _scratch_mkfs_blocksized: fix indentation Anand Jain

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).