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

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

 



Dave Chinner <david@xxxxxxxxxxxxx> writes:

> 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?
>

Agreed. Not needed we can have configs/ext4.config, configs/xfs.config
and so on...

>> 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?
>

Let me try and explain this below.


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

Same here.

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


I will try and explain our reasoning here: 

1. Why have per-fs config file i.e. configs/ext4.config or 
configs/xfs.config...

Instead of 1 large config file it's easier if we have FS specific
sections in their own .config file. I agree we don't need configs/<fs>
directories for each filesystem. But it's much easier if we have
configs/<fs>.config with the necessary sections defined in it.  That
will be easy to maintain by their respective FS maintainers rather than
maintaining all sections defined in 1 large common config file.

2. Why then add the infrastructure to create a new common
configs/all-fs.config file during make?

This is a combined configs/all-fs.config file which need not be
maintained in git version control. It gets generated for our direct
use. This is also needed to run different cross filesystem tests from a
single ./check script. i.e. 

        ./check -s ext4_4k -s xfs_4k -g quick

(otherwise one cannot run ext4_4k and xfs_4k from a single ./check invocation)

I don't think this is too much burden for "make" to generate this file.
And it's easier than, for people to use configs/all-fs.config to run
cross filesystem tests (as mentioned above).

e.g. 
1. "make" will generate configs/all-fs.config
2. Define your devices.config in configs/devices.config
3. Then run 
   (. configs/devices.config; ./check -s ext4_4k -s xfs_4k -g quick)

Note:
One problem which I can think of with the sections approach as opposed
to multiple small config files (-c configs/ext4/4k.config) approach is
that, in sections approach we iterate over all the sections present in
the provided config file and search for the section passed in the
cmdline. Whereas in the small config files approach we were directly
passing the configuration options via a small config file. But hopefully
that linear search in locating the section is not as time consuming as
opposed to running the test itself.


Here is the sample change snippet which we are thinking of.
Thoughts?



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux