On Wed, 2006-07-05 at 17:20 +0200, Tomas M wrote:
>  > After spending a while thinking about this I do not think that remount
>  > is appropriate for adding/removing/reordering branches. While remount
>  > seems to be the ideal way to change branch configurations the amount
>  > of data that can be passed to it seems like it will not be enough.
> 
> How would you add a branch to existing union by using this pseudo 
> filesystem? (in your example). Thank you.
> 
> 
> Tomas M
> _______________________________________________
> unionfs mailing list
> [email protected]
> http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

To do this you would create a new sub-directory under your union and
then proceed to cat a new string into the branch ordering file for the
union. Here is an example of the commands

cd /unionfs/union1
mkdir branch3
cd branch3
echo mypath > path
echo mymode > mode
#echo imap info if necessary
echo myimap > imap
#back to our directory for our union
cd ..
#this line will check the current against what is being
#written to this file to check if changes are necessary
#and will perform the correct operations (shifting, adding, 
#deleting etc)
echo branch1,branch3,branch2 > branches

At this point you should have the new configuration in since we
will be checking for writes to this special file as a trigger to
internally perform what a remount or branchman ioctl would do. Since we
are keeping the old and new strings we can use the strings to more
easily perform these comparisons since we are dealing with branch
identifiers rather than paths. We can still have the current unionctl
functionality except its much cleaner and easier to implement because we
are not dealing with ioctls since internally it all comes down to a
"remount" which will be done through the branches file. In the case of
the add before unionctl command we would just search for the identifier
in the current string and make a new string with your branch identifier
before it and pass that in additionally if the branch doesn't already
exist in our psudofs we would need to add it. This way we can keep both
interfaces for legacy use and for new users.

-- 
David Quigley <[EMAIL PROTECTED]>

_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to