[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    [fuse-devel] my filesystem: workspace or configurable dereference
From:       Stef Bon <stefbon () gmail ! com>
Date:       2009-08-27 14:46:37
Message-ID: 3c0132f00908270746h6c201534pb490b4a515d1872 () mail ! gmail ! com
[Download RAW message or body]

Hello,

after experimenting I've succeeded in writing my own filesystem!

It's looking a lot like fusexmp, part of the fuse source. It's showing
under the mountpoint
the contents of a directory. This directory is hardcoded, $HOME/.fuse/bind.

It's not only showing the contents of this directory (which would not
be so interesting), but
is able to dereference the symbolic links to directories, and presents
them not as links but as directories.
It's not doing that for every link, but only for preconfigured ones.
To do so, I've created a shadow
directory, also hardcoded here: $HOME/.fuse/shadow. It works like follows:

the fuse module finds a symbolic link, looks for the existence of the
directory (not symlink!) in the shadow
directory. If it exists, it will present it as directory, if not it
will remain an symlink.

This makes it possible to create an map with symbolic links to places
of interest, but it looks like
they are direct available in this map.

Using this shadow map in the fusemodule is very very easy to use and
program in C, just use the path provided,
and do a lookup of the directory in the shadowdirectory. Much much
easier than searching in text files or database!!

An example is hardware mounted with hal. It's mounted at /media, which
is IMHO not the most
userfriendly place. Much better would be somewhere in the
homedirectory. With this construction this is
possible:

create the directories  ~/.fuse/bind/devices and ~/.fuse/shadow/devices
if hal has mounted the USB device to /media/disk, create a symlink
~/.fuse/bind/devices/<self chosen name> -> /media/disk,
like ~/.fuse/bind/devices/My USB stick -> /media/disk
and create the directory ~/.fuse/shadow/devices/My USB stick

now create the mountpoint:

~/Workspace

mount:

fuse-workspace ~/Workspace

and you can browse the device as if it's mounted directly in your homedirectory:

~/Workspace/devices/My USB stick


Other examples:
- sharing public documents through a symlink to /home/public/Public
documents, presented as directory
- networkconnetions to for example samba/windows shares, mounted by
autofs on a central place, also through
symlinks presented as directory
- systemdocumentation in /usr/share/doc


Now the reason for me to mail is:
- how can I make my project added to the available fuse modules?
- point others at the easyness of making use of a "shadow" directory
to achieve special behaviour (much better than textfiles or db)
- dereferencing (I've read this somewhere in the wiki that this is a
wish: it's possible this way)

I've written a website about this at:

http://linux.bononline.nl/linux/fuse-workspace/index.php


Looking forward to your reaction,

Stef Bon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic