From: Auke Kok <auke.kok@versity.com>
To: fstests@vger.kernel.org
Cc: Auke Kok <auke.kok@versity.com>
Subject: [PATCH] common: add scoutfs support.
Date: Fri, 27 Jun 2025 11:42:20 -0700 [thread overview]
Message-ID: <20250627184220.114746-1-auke.kok@versity.com> (raw)
Basic scoutfs support: scoutfs uses 2 devices for a filesystem, one for
metadata, and one for data. This requires that we pass a metadev_path
argument to every mount call, as well as a quorum_slot option.
To run any of these tests on scoutfs, you'll need to build and
install the out-of-tree kernel module `scoutfs.ko`, and the `scoutfs`
userspace utility, which can `mkfs` a scoutfs filesystem. The tests
themselves are unmodified - many of them will be skipped due to
unsupported features.
Signed-off-by: Auke Kok <auke.kok@versity.com>
---
common/config | 1 +
common/rc | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/common/config b/common/config
index 22b52432..5273790d 100644
--- a/common/config
+++ b/common/config
@@ -228,6 +228,7 @@ export BTRFS_MAP_LOGICAL_PROG=$(type -P btrfs-map-logical)
export PARTED_PROG="$(type -P parted)"
export XFS_PROPERTY_PROG="$(type -P xfs_property)"
export FSCRYPTCTL_PROG="$(type -P fscryptctl)"
+export SCOUTFS_PROG="$(type -P scoutfs)"
# udev wait functions.
#
diff --git a/common/rc b/common/rc
index f71cc8f0..47aac12b 100644
--- a/common/rc
+++ b/common/rc
@@ -361,6 +361,9 @@ _scratch_options()
ext2|ext3|ext4)
_scratch_ext4_options "$@"
;;
+ scoutfs)
+ SCRATCH_OPTIONS=$SCOUTFS_SCRATCH_MOUNT_OPTIONS_META_DEV
+ ;;
esac
}
@@ -396,7 +399,14 @@ _test_options()
# hosted on $SCRATCH_DEV, so can't use external scratch devices).
_common_dev_mount_options()
{
+ case "$FSTYPE" in
+ scoutfs)
+ echo $MOUNT_OPTIONS $SELINUX_MOUNT_OPTIONS $SCOUTFS_MOUNT_OPTIONS_META_DEV $*
+ ;;
+ *)
echo $MOUNT_OPTIONS $SELINUX_MOUNT_OPTIONS $*
+ ;;
+ esac
}
_scratch_mount_options()
@@ -851,6 +861,9 @@ _test_mkfs()
bcachefs)
$MKFS_BCACHEFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
;;
+ scoutfs)
+ $SCOUTFS_PROG mkfs $MKFS_OPTIONS $* $TEST_DEV
+ ;;
*)
yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $TEST_DEV
;;
@@ -896,6 +909,9 @@ _try_mkfs_dev()
xfs)
$MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $*
;;
+ scoutfs)
+ $SCOUTFS_PROG mkfs $MKFS_OPTIONS $*
+ ;;
*)
yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $*
;;
@@ -1003,6 +1019,10 @@ _scratch_mkfs()
mkfs_cmd="$MKFS_BCACHEFS_PROG"
mkfs_filter="cat"
;;
+ scoutfs)
+ mkfs_cmd="$SCOUTFS_PROG mkfs $MKFS_OPTIONS $MKFS_SCRATCH_OPTIONS $* $SCRATCH_META_DEV"
+ mkfs_filter="cat"
+ ;;
*)
mkfs_cmd="yes | $MKFS_PROG -t $FSTYP --"
mkfs_filter="cat"
@@ -3670,6 +3690,9 @@ _check_test_fs()
f2fs)
_check_f2fs_filesystem $TEST_DEV
;;
+ scoutfs)
+ # currently not checking
+ ;;
*)
_check_generic_filesystem $TEST_DEV
;;
@@ -3729,6 +3752,9 @@ _check_scratch_fs()
f2fs)
_check_f2fs_filesystem $device
;;
+ scoutfs)
+ # currently not checking
+ ;;
*)
_check_generic_filesystem $device
;;
--
2.49.0
next reply other threads:[~2025-06-27 18:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 18:42 Auke Kok [this message]
2025-06-30 5:38 ` [PATCH] common: add scoutfs support Christoph Hellwig
2025-06-30 18:16 ` Auke Kok
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=20250627184220.114746-1-auke.kok@versity.com \
--to=auke.kok@versity.com \
--cc=fstests@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox