Re: [LSF/MM/BPF TOPIC] xfstests: Centralizing filesystem configs and device configs

Dave Chinner
2025-03-04T21:45:10Z

On Sat, Mar 01, 2025 at 06:39:57PM +0530, Ritesh Harjani wrote:
> > Why is having hundreds of tiny single-config-only files
> > better than having all the configs in a single file that is
> > easily browsed and searched?
> >
> > Honestly, I really don't see any advantage to re-implementing config
> > sections as a "file per config" object farm. Yes, you can store
> > information that way, but that doesn't make it an improvement over a
> > single file...
> >
> > All that is needed is for the upstream repository to maintain a
> > config file with all the config sections defined that people need.
> > We don't need any new infrastructure to implement a "centralised
> > configs" feature - all we need is an agreement that upstream will
> > ship an update-to-date default config file instead of the ancient,
> > stale example.config/localhost.config files....
> >
>
> If we can create 1 config for every filesystem instead of creating a lot
> of smaller config files. i.e.
> - configs/ext4/config.ext4
> - configs/xfs/config.xfs

Why are directories that contain a single file needed here?

> Each of above can contain sections like (e.g.)
>
> [xfs-b4k]
> MKFS_OPTIONS="-b size=4k"
> ddUNT_OPTIdd d=""dd
>
> [xfs-b64k]
> MKFS_OPTIONS="-b size=64k"
> MOUNT_OPTIONS=""
>
>
> Then during make we can merge all these configs into a common config file
> i.e. configs/.all-section-configs. We can update the current check script to
> look for either local.config file or configs/.all-section-configs file
> for location the section passed in the command line.

What does this complexity gain us?

> This will help solve all the listed problems:
> 1. We don't have to add a new parsing logic for configs

We don't need new config files and makefile/build time shenanigans
to do this.

> 2. We don't need to create 1 file per config

Ditto.

> 3. We still can get all sections listed in one place under which check
> script can parse.

Ditto.

> 4. Calling different filesystem sections from a common config file can work.

Yes, that's the whole point of have config sections: one config file
that supports lots of different test configurations!

> So as you mentioned calling something like below should work.
>
> ./check -s xfs_4k -s ext4_4k -g quick
>
> Hopefully this will require minimal changes to work. Does this sound
> good to you?

You haven't explained why we need new infrastructure to do something
we can already do with the existing infrastructure. What problem are
you trying to solve that the current infrastructure does not handle?

i.e. we won't need to change the global config file very often once the
common configs are defined in it; it'll only get modified when
filesystems add new features that need specific mkfs or mount option
support to be added, and that's fairly rare.

Hence I still don't understand what new problem multiple config files
and new infrastructure to support them is supposed to solve...

-Dave.
--
Dave Chinner
david@fromorbit.com