Re: Has it been done: User Script File System?

2001-06-16 Thread Pavel Machek

Hi!

> Is there any filesystem in Linux that uses user scripts/executables to
> implement the various function calls?  What I'm thinking of is something
> along the lines of a file system module that, when it receives a call
> from VFS, passes the information out to a user-mode daemon which could
> then run scripts or executables to answer the question.  The daemon
> would then return the answer to the module, and the module would answer
> VFS.

Take a look at uservfs.sourceforge.net. Its extfs module is basically what
you want. zipfs is already implemented using script...
Pavel
-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-16 Thread Pavel Machek

Hi!

 Is there any filesystem in Linux that uses user scripts/executables to
 implement the various function calls?  What I'm thinking of is something
 along the lines of a file system module that, when it receives a call
 from VFS, passes the information out to a user-mode daemon which could
 then run scripts or executables to answer the question.  The daemon
 would then return the answer to the module, and the module would answer
 VFS.

Take a look at uservfs.sourceforge.net. Its extfs module is basically what
you want. zipfs is already implemented using script...
Pavel
-- 
Philips Velo 1: 1x4x8, 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-13 Thread Jeremy Fitzhardinge

Quoting Russ Lewis <[EMAIL PROTECTED]>:
> mount -t userfs   /etc/myfs.conf   /myfs

I did this a while ago: I wrote userfs which allowed arbirary filesystems to be
implemented in user space.  One of these was a filesystem which allowed you to
embed scripts in symlinks, such that stdout of the script was read as the
contents of the file.

userfs has fallen into disrepair lately, but there are other projects with
similar goals.  See http://www.goop.org/~jeremy/userfs/.

J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-13 Thread Peter Makholm

[EMAIL PROTECTED] (Russ Lewis) writes:

> Is there any filesystem in Linux that uses user scripts/executables to
> implement the various function calls?  What I'm thinking of is something

It has been done before.

http://www.ibiblio.org/pub/Linux/ALPHA/userfs/userfs.lsm describes a
patch/kernel module for kernel 1.2.10, 1.3.13 and 2.0.30.

I vaguely remember that some more resen suggestion was to implement it
with the some usper-space nfs-deamon.

-- 
hash-bang-slash-bin-slash-bash
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-13 Thread Jeff Dike

[EMAIL PROTECTED] said:
> Is there any filesystem in Linux that uses user scripts/executables to
> implement the various function calls?

http://uservfs.sourceforge.net

Also, have a look at the hostfs filesystem in UML.  It implements a virtual 
filesystem which provides access to the host filesystems from inside the 
virtual machine.  The userspace side of it is basically trivial to implement 
and can be used to provide filesystem access to anything on the host that can 
be made to look like a filesystem.

See http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/user-mode-linux/linux/arch/u
m/fs/hostfs/hostfs_user.c?rev=1.11=text/vnd.viewcvs-markup for 
the interface that you'd have to implement.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Has it been done: User Script File System?

2001-06-13 Thread Russ Lewis

Is there any filesystem in Linux that uses user scripts/executables to
implement the various function calls?  What I'm thinking of is something
along the lines of a file system module that, when it receives a call
from VFS, passes the information out to a user-mode daemon which could
then run scripts or executables to answer the question.  The daemon
would then return the answer to the module, and the module would answer
VFS.

The reason I'm wondering is that I have a lot of brainstorms about
things that might be cool to implement as filesystems, but I don't want
to take the time to have to implement a full filesystem for each
(especially considering the number of bugs and kernel panics I'm likely
to encounter in the process).  What I'd really like to do is something
like this:

mount -t userfs   /etc/myfs.conf   /myfs

Where /etc/myfs.conf would have something like this:

lookup:  /usr/bin/myfslookup
open:   /usr/bin/myfsopen
etc...

I know that it would be very slow, and might require some modifications
to VFS to make it work (in addition to the module I'd have to write),
but it would be really nice to be able to throw together a very simple
utility filesystem without having to worry about crashing the kernel.

Does Linux have anything even remotely like this?  If not, I might (if I
can spare the time) play around with something like this of my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-13 Thread Jeff Dike

[EMAIL PROTECTED] said:
 Is there any filesystem in Linux that uses user scripts/executables to
 implement the various function calls?

http://uservfs.sourceforge.net

Also, have a look at the hostfs filesystem in UML.  It implements a virtual 
filesystem which provides access to the host filesystems from inside the 
virtual machine.  The userspace side of it is basically trivial to implement 
and can be used to provide filesystem access to anything on the host that can 
be made to look like a filesystem.

See http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/user-mode-linux/linux/arch/u
m/fs/hostfs/hostfs_user.c?rev=1.11content-type=text/vnd.viewcvs-markup for 
the interface that you'd have to implement.

Jeff


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Has it been done: User Script File System?

2001-06-13 Thread Peter Makholm

[EMAIL PROTECTED] (Russ Lewis) writes:

 Is there any filesystem in Linux that uses user scripts/executables to
 implement the various function calls?  What I'm thinking of is something

It has been done before.

http://www.ibiblio.org/pub/Linux/ALPHA/userfs/userfs.lsm describes a
patch/kernel module for kernel 1.2.10, 1.3.13 and 2.0.30.

I vaguely remember that some more resen suggestion was to implement it
with the some usper-space nfs-deamon.

-- 
hash-bang-slash-bin-slash-bash
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/