lkml.org 
[lkml]   [1998]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNeed a "virtual directory" ... the solution

So I am glad to post here the announcement for the first version of
symlinkfs.

WARNING: this is ALPHA quality.

If anybody (except me) finds this useful or interesting, or finds
any bug, or, miracle, succeeds in using it, I appreciate any feedback.

(If someone wants the sources, I will send them by mail. If there are
more people interested in, I will post the sources somewhere, just tell me
where.)

Here is the README file:

-----------------------------------------------------------------------
This README file describes the Symlink File System, version 0.1, 27.04.1998

Author: Stelian Pop <spop@captimark.fr>

Symlinkfs is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.

WHAT IS SYMLINKFS:
==================

Symlinkfs is a filesystem for Linux. A symlinkfs filesystem is composed
by only one directory which contains several symbolic links.

The name of the links and the their destination are calculated each time a
user enters this directory (or accesses a file from the directory).

The names and the destinations are based on fixed strings or on users'
environment variables. Users who have different values for the environment
variables see different files in the directory.

I wrote this filesystem in order to easily use Rational's (Atria's ) ClearCase
configuration management software (sort of advanced CVS, RCS).


SIMPLE EXAMPLE:
===============

Consider two users, "wolf" and "udo".

They have their home in /home/wolf and /home/udo. "wolf" works on a
project which is in /usr/src/wolf, and "udo" works on a project which
is in /usr/src/udo, but both of them want to see the project in /project/src.

In order to do this, each user must create an environment variable, say
SRCDIR, which points to /usr/src/wolf for "wolf" and /usr/src/udo for
"udo":
(udo bash)$ export SRCDIR=/usr/src/udo
(wolf bash)$ export SRCDIR=/usr/src/wolf

We create a symlinkfs filesystem under the /project directory which will
do the translation src -> $SRCDIR

(root bash)$ insmod symlinkfs.o options="src \$SRCDIR"
(root bash)$ mount -t symlinkfs none /project

And that's it! Each user will see two different /project/src trees.


USAGE:
======

The symlink filesystem is built as a module.

The link names and destinations are specified when "insmoding" with a line:

insmod symlinkfs.o options="name1 dest1 ... namen destn"

where each "name" and "dest" is a string. If the string begins with a '$' it
is treated as an environment variable which will be evaluated each time the
filesystem is accessed. If the string does not begin with a '$' it is
considered to be a fixed string.


COMPATIBILITY:
==============

The symlink filesystem has been tested on kernel 2.0.32, on a RedHat 5.0
Linux (glibc).

It does not require a kernel patch.


CAVEATS:
========

This version should be considered as an ALPHA version. It works for me,
but I can make no guarantee that it will do the same for you.

In particular:
- no tests are done on the options strings. It is possible to get
several entries with the same name, cyclic links etc. This IS
a security problem !!!
- some environment variable contents could crash the kernel (I didn't
found any, but I'm sure they exists).
- since this is my first kernel development, I cannot tell if I did
the "right" programming. If a kernel guru looks into the code,
he will probably discover some possible deadlocks, memory problems etc.

You're welcome to send me any feedback.

_____________________________________________________________________________

ClearCase is a registred trademark of Rational Software Corporation.

----------------------------------------------------------------------------

---
Stelian Pop <spop@captimark.fr>| Too many things happened today
Captimark | Too many words I don't wanna say
Paris, France | I wanna be cool but the heat's coming up
| I'm ready to kill 'cause enough is enough
PGP key available on request | (Accept - "Up To The Limit")


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.066 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site