Hello, Recently I have been browsing the code implementing the stowing feature in unionfs it struck me that I cannot figure out the reason for it to be implemented in the way it is.
Normally the stowing feature works as follows: one starts unionfs in the following way: $ settrans -a <node> unionfs --stow=<stow-directory> At startup and at every change in <stow-directory>, unionfs reads the list of subdirectories of <stow-directory> and adds all new directories it finds to the list of merged directories and/or removes the directories which are not longer present in <stow-directory>. The stowing feature also allows a pattern-matching option, and it is this option that confuses me. When starting unionfs, one can specify a shell wildcard via the ``--match=<wildcard>'' option which will be used to filter the directories from <stow-directory>. The filtering is done in the following way: unionfs iterates through *all* subdirectories of <stow-directory>, then it goes through all sub-subdirectories of every subdirectory and adds those sub-subdirectories which match the wildcard. In other words, unionfs adds the sub-subdirectories matching <stow-directory>/*/<wildcard>. My problem is that I cannot see how this could be more useful than filtering the first-level subdirectories of <stow-directory> (that is, adding the subdirectories matching <stow-directory>/<wildcard>). Also, such treatment of the wildcard is not something obvious, IMHO. For instance, it makes the following two commands fundamentally different: $ settrans -a <node> unionfs --stow=<stow-directory> $ settrans -a <node> unionfs -m "*" --stow=<stow-directory> However, I would expect the second command to yield the same results as the first one. Could somebody tell me whether I'm missing something crucial? Regards, scolobb