bug-hurd
[Top][All Lists]
Advanced

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

Re: unionfs: stowing feature


From: Gianluca Guida
Subject: Re: unionfs: stowing feature
Date: Sun, 23 Aug 2009 22:42:41 +0200

Hi Sergiu,

I do agree that it's counter-intuitive. Please note that the stow
functionality was mostly meant for the GNU system as a base for a --
rather complex I'd say -- packaging system.

The idea was that the first level after the stow directory was the
package, and we were matching against package's subdirectories. At the
time, I was actually in favor of a separate stowfs which were just
using common code for unionfs, but politics and other rather
meaningless reasons brought it into the way it is now.

No engineering, just pragmaticism.

Hope this helps getting you in getting the code where you want it.
Gianluca

On Sun, Aug 23, 2009 at 4:49 PM, Sergiu
Ivanov<address@hidden> wrote:
> 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
>
>
>



-- 
It was a type of people I did not know, I found them very strange and
they did not inspire confidence at all. Later I learned that I had been
introduced to electronic engineers.
                                                  E. W. Dijkstra




reply via email to

[Prev in Thread] Current Thread [Next in Thread]