Re: [RFC PATCH] file as directory

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Miklos Szeredi <miklos@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <akpm@...>, <viro@...>, <torvalds@...>
Date: Wednesday, May 23, 2007 - 9:20 am

Hello,

On Tuesday May 22, 2007, Miklos Szeredi wrote:

I work for a similir goal in my bachelor's theses. But my approach is 
a little bit different. Instead of:


I do:
   'foo.zip^/foo/bar' or
   'foo.zip^/contents/foo/bar'

where foo.zip is a ZIP file. See the little '^' in the pathname: it's an
escape character. I have a kernel patch which modifies a lookup 
resolution function and when a normal lookup fails ('foo.zip^/foo/bar'
dosn't exist) and the pathname contains '^' it *redirects* the lookup to 
a FUSE mount.

So say we have a FUSE vfs server (called 'RheaVFS') on '/tmp/shadow'. 
When a process tries to access '/home/xx/foo.zip^/foo/bar' 
it is in-kernel transparently redirected to 
'/tmp/shadow/home/xx/foo.zip^/foo/bar' and the vfs server handles all the
extraction/compresion/semi-mounting/semi-umounting/whatsoever...

Advantages:
* 99.9% imho backward compatible. No problems with clever programs 
  doing stat() before open()/opendir().
* you can easily and transparently stack filesystems one on top of another
  with a clear semantic. Say we have 'foo.tar.gz'; then:
	'foo.tar.gz^' is a decompressed TAR *file*;
	'foo.tar.gz^^' is a directory
* you can pass additional parameters to the vfs server after the '^', 
  eg. 'foo.zip^compresslevel=1/foo/bar'
* works with symlinks too

Drawbacks:
* users must/should be aware of the special escape char '^'
* usually only single vfs server per user handles all "virtual"
  directories --> single point of failure. (But I implemented a quirk
  which allows restarting the FUSE vfs server with only minor
  problems)
* probably tons of others I don't know....

The project tarball is at:

http://veverka.sh.cvut.cz/~sykora/prj/rheavfs-20070523-1239.tar.gz

The kernel patch is in the tarball and for your viewing pleasure 
I've attached it to this email.
The patch is againts 2.6.20.1 and works with 2.6.21.1 too.
There are two minor failed hunks for 2.6.22-rc2 which I hadn't time to correct.

My project is not completed, there's almost no documentation etc.
Maybe I will put together some simple README/HOWTO in a few days.
I wouldn't present the project at this time, but seeing your post
I've thought my approach might be interesting for the discussion.


	Jara

-- 
I find television very educating. Every time somebody turns on the set, 
I go into the other room and read a book.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH] file as directory, Miklos Szeredi, (Tue May 22, 2:48 pm)
Re: [RFC PATCH] file as directory, Jaroslav Sykora, (Wed May 23, 9:20 am)
Re: [RFC PATCH] file as directory, Jan Engelhardt, (Wed May 23, 8:01 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 5:51 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 6:09 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 6:24 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 6:24 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 6:40 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 7:39 am)
Re: [RFC PATCH] file as directory, Ph. Marek, (Wed May 23, 9:23 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 9:54 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 8:16 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 9:01 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 9:51 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 10:32 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 11:06 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 11:25 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 11:37 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 11:55 am)
Re: [RFC PATCH] file as directory, Shaya Potter, (Tue May 22, 7:26 pm)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 2:39 am)
Re: [RFC PATCH] file as directory, Al Viro, (Tue May 22, 6:10 pm)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 2:36 am)
Re: [RFC PATCH] file as directory, Pavel Machek, (Thu May 24, 8:07 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Mon May 28, 10:43 am)
Re: [RFC PATCH] file as directory, Jan Blunck, (Wed May 23, 5:21 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 5:35 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 3:03 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 3:19 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 3:36 am)
Re: [RFC PATCH] file as directory, Trond Myklebust, (Wed May 23, 8:34 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 8:40 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 4:05 am)
Re: [RFC PATCH] file as directory, Jan Blunck, (Wed May 23, 5:16 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 5:28 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 4:29 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 5:03 am)
Re: [RFC PATCH] file as directory, Al Viro, (Wed May 23, 5:58 am)
Re: [RFC PATCH] file as directory, Miklos Szeredi, (Wed May 23, 6:14 am)