Re: [PATCH v2] fstests: add btrfs standard configuration

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





On 9/4/25 18:00, Filipe Manana wrote:
On Fri, Mar 28, 2025 at 4:52 AM Anand Jain <anand.jain@xxxxxxxxxx> wrote:

Here's a standard configuration for quick, regular checks, commonly used
during development to verify Btrfs.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
v2:
- Renamed config file to `configs/btrfs-devel.config`
- global section renamed to `generic-config`
- Section names now use hyphens
- Added `RECREATE_TEST_DEV=true`
- Removed `MKFS_OPTIONS="--nodiscard"` from `generic-config`

  .gitignore                 |  2 ++
  configs/btrfs-devel.config | 40 ++++++++++++++++++++++++++++++++++++++
  2 files changed, 42 insertions(+)
  create mode 100644 configs/btrfs-devel.config

diff --git a/.gitignore b/.gitignore
index 4fd817243dca..9a9351644278 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,8 @@ tags

  # custom config files
  /configs/*.config
+# Do not ignore the btrfs devel config for testing
+!/configs/btrfs-devel.config

  # ltp/ binaries
  /ltp/aio-stress
diff --git a/configs/btrfs-devel.config b/configs/btrfs-devel.config
new file mode 100644
index 000000000000..3a07b731abd9
--- /dev/null
+++ b/configs/btrfs-devel.config
@@ -0,0 +1,40 @@
+# Modify as required
+[generic-config]
+TEST_DIR=/mnt/test
+TEST_DEV=/dev/sda
+SCRATCH_MNT=/mnt/scratch
+SCRATCH_DEV_POOL="/dev/sdb /dev/sdc /dev/sdd /dev/sde"
+LOGWRITES_DEV=/dev/sdf
+RECREATE_TEST_DEV=true

All these mount paths and device paths are far from "standard" as the
changelog suggests.
It's certainly different for me.

Plus this isn't sufficient for some tests that need more devices in the pool:

btrfs/292 needs 6
btrfs/294 needs 8



Thanks! for the review.

Yep, as mentioned in the comment, feel free to modify as needed.
The goal is to stick with the most common device paths, but
if you think another one device paths are common, I’m fine with that.

I had considered automating it, but device paths don’t support
user attributes. If they did, we could’ve used that to detect
devices for fstests automatically.

I also looked into emulating zoned devices using a block device
as the backing store — that’ll need more work.

For now, just going with a basic approach.


I'm also seeing RECREATE_TEST_DEV=true for the first time. Why is this needed?


Filipe, some of these are from Josef's fstests config. It mkfs the
filesystem on TEST_DEV for each test case, probably to make
sure everything starts fresh. No?

+
+[btrfs-compress]
+MKFS_OPTIONS="--nodiscard"
+MOUNT_OPTIONS="-o compress"
+
+[btrfs-holes-spacecache]
+MKFS_OPTIONS="--nodiscard -O ^no-holes,^free-space-tree"
+MOUNT_OPTIONS=" "
+
+[btrfs-holes-spacecache-compress]
+MKFS_OPTIONS="--nodiscard -O ^no-holes,^free-space-tree"
+MOUNT_OPTIONS="-o compress"
+
+[btrfs-block-group-tree]
+MKFS_OPTIONS="--nodiscard -O block-group-tree"
+MOUNT_OPTIONS=" "
+
+[btrfs-raid-stripe-tree]
+MKFS_OPTIONS="--nodiscard -O raid-stripe-tree"
+MOUNT_OPTIONS=" "
+
+[btrfs-squota]
+MKFS_OPTIONS="--nodiscard -O squota"
+MOUNT_OPTIONS=" "
+
+[btrfs-subpage-normal]
+MKFS_OPTIONS="--nodiscard --nodesize 4k --sectorsize 4k"
+MOUNT_OPTIONS=" "
+
+[btrfs-subpage-compress]
+MKFS_OPTIONS="--nodiscard --nodesize 4k --sectorsize 4k"
+MOUNT_OPTIONS="-o compress"

Why the --nodiscard?
I don't use it in my setups, doing the discard doesn't cause any
significant slowdown for me using 100G devices with qmu (raw type and
with discard support), and it's good to the discard.


Yep, it doesn’t take much time on mine either. I’m fine with
dropping nodiscard.

So I think this is far from standard as you claim in the changelog and
won't fit everybody. It certainly doesn't for me.


The main things are the other config items, except for the ones under
the 'modify as needed' comment (ignore the nodiscard part). As long as
we’re all on the same page that every release needs to pass this, we’re
good for now.

Thanks, Anand


Thanks.

--
2.47.0







[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