#1648 PR merged: mount noise in 400_save_directories excluded_fs_types?

Labels: enhancement, cleanup, fixed / solved / done

ProBackup-nl opened issue at 2017-12-14 15:28:

What is the definition of unwanted "noise" from the mount points?

https://github.com/karelzak/util-linux/blob/master/libmount/src/utils.c#L267
till
https://github.com/karelzak/util-linux/blob/master/libmount/src/utils.c#L299
contain more then 3 pseudo file systems "cgroup|fuse.*|nfsd".

Which of libmount/src/utils.c additional pseudo-FS are also "noise" in this context?

I have included them all here, with the goal to easily remove the file systems that are needed are.

jsmeix commented at 2017-12-15 10:31:

If there was a definition I would have written that
in the comment in the code.
I introduced the unspecific word

"noise"

because of
https://github.com/rear/rear/pull/1459/files/df05357117d7f4714353625035fd34b24b2586a3#r135744282
and related comments in
https://github.com/rear/rear/pull/1459

gdha commented at 2017-12-22 07:51:

@ProBackup-nl Why not making an array of pseudofs ? A long list as you proposed looks ugly and is difficult to read. What do you think?

ProBackup-nl commented at 2017-12-22 10:25:

@gdha I have no preference for either array or list, as long as the items are sorted.

jsmeix commented at 2018-01-03 10:36:

@ProBackup-nl
many thanks for your in-depth analysis what such
"unwanted noise" actually should be that results
this clear and explicable solution.

jsmeix commented at 2018-01-03 10:47:

@gdha
beware of arrays as panacea for anything
that contains more than one word ;-)
cf. https://github.com/rear/rear/pull/1495#issuecomment-330161395

See how the excluded_fs_types string is used in the code:
Its value is used as egrep pattern (and a egrep pattern is a string).
Accordingly in this case a string of words fits better than a
complicated construct of separated words (i.e. an array).
Actually the excluded_fs_types value is even a single word.

jsmeix commented at 2018-01-03 10:53:

@ProBackup-nl
I have a question regarding your
https://github.com/rear/rear/pull/1648#issuecomment-353569516

Why must the items be sorted?

I think in general it does not matter in an egrep pattern
whether or not its items are sorted, e.g. as in

# echo -e 'foo\nbar\nbaz' | grep -E 'baz|foo'
foo
baz

[Export of Github issue for rear/rear.]