"Why Reuser 4 still is not in" doc
Quoted 7 lines · Jan Engelhardt
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
(aside from the VFS integration debate)
Anybody know what's in Reiser4 that VFS doesn't like (link please)?
Reiser4 plug-ins have (had?) the ability to alter the semantics of things, like making files into directories inside
Quoted 6 lines
Yes, it changes the semantics. Suddenly you can "cd linux-2.6.17.tar.bz2". But what will
stat()return?S_IFDIR?S_IFREG?S_IFANY? A .tar parser in kernelspace is almost never the right thing. And then a cpio parser, because that's what initramfs'es are made of. Not to forget .zip, because that's omnipresent. Oh of course we'd also need bzip2 and gzip decoder. BASE64 and UU anyone?
Using this as an argument against plug-ins is a bit strange. I suppose somebody could go overboard and use plug-ins to implement a subKernel. Would this then imply that plug-ins are wrong?
Quoted 11 lines
Quoted 6 lines
which you could see meta-files like
file/uid and file/size which contained meta-data and such accessible as normal files to all the unix tools (which is a very good idea IMO). You could get things like chmod by just 'echo rootQuoted 1 line
file/owner' or something, very nice.
I wish you a lot of fun with users in LDAP or other exotic storage methods. By making Everything possible through echo, you are violating the unix philosophy that one tool should do one thing (though echo does just that).
The unix philosophy would hold with plug-ins, as this would aid flexibility. Using plug-ins is a form of modularization, much like the 'one tool should do one thing' approach.
Quoted 4 lines
And in this case, echo would be chown, chmod, tar, bzip2 all at once. This sounds familiar, I think I have seen this with explorer.exe (and its uncountable DLLs), which lets you change everything within the same window.
Nothing wrong with that, unless you have an allergy against explorer.
Quoted 3 lines
What I think is promising are the compression/encryption plugins. ext2 and 3 had an attribute (
lsattr) for compression but it does not seem like ever implemented.
Now that's a great example for using a plug-in in the wright place.
Quoted 2 lines
Quoted 2 lines
This was frowned upon by kernel developers who felt that it belonged in the kernel VFS (if at all), rather than in reiser4 directly.
This is really the crux of the issue. Introducing plug-ins into the FS is really the wrong place, when we already have an abstracted VFS that allows this to be fanned out to its children.
Thanks!
--
Al
Quoted 5 lines
Using this as an argument against plug-ins is a bit strange. I suppose somebody could go overboard and use plug-ins to implement a subKernel. Would this then imply that plug-ins are wrong?
Ok, I've read some other threads too and so this claim should be adjusted:
Writing a plugin (not necessarily r4 specific) that changes the semantics of objects based on context (i.e. turning a file into a dir) is a bad idea IMHO.
Actually, BSD has this double-semantic to a limited degree: you can call /usr/bin/vi /usr/bin and get some binary representation of readdir.
Jan Engelhardt
Quoted 3 lines
Writing a plugin (not necessarily r4 specific) that changes the semantics
of objects based on context (i.e. turning a file into a dir) is a bad
idea
Quoted 1 line
IMHO.
I'm with you on that, but I don't believe the Reiser4 plugins that have been proposed do that. In fact, I'm not sure they could, because the plugin probably doesn't get much context information.
In the file/directory thing, we're really talking about a filesystem object which is both at the same time, not one that is one or the other depending on context. Being both at the same time causes some problems with classifying it. When a product is both a floor wax and a dessert topping, on what aisle do you stock it?
The idea of having standard Unix filesystem operations mean different things on different objects is well established and fully user-pluggable. A write() of a device special file for a terminal does a rather different thing from a write() of a regular file. And, of course, there's proc.
So there are valid objections to installing a plugin that lets you 'ls' a tar file, but Reiser4 plugins per se don't seem to be the problem.
Quoted 2 lines
Actually, BSD has this double-semantic to a limited degree: you can call
/usr/bin/vi /usr/binand get some binary representation of readdir.
I think that's actually more of a vestige than an innovation. Linux is more evolved in failing an attempt to read() a directory. In original Unix, the directory system was almost completely separate from the flat file system, with each directory being implemented as a file. It would have taken work _not_ to let the user read() it. This was very bad for forward compatibility, and was one of the ways that it's apparent that the designers couldn't make up their mind whether the directory layer should be separate or not.
--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems
Quoted 9 lines · Jan Engelhardt
Quoted 3 lines
Using this as an argument against plug-ins is a bit strange. I suppose somebody could go overboard and use plug-ins to implement a subKernel. Would this then imply that plug-ins are wrong?
Ok, I've read some other threads too and so this claim should be adjusted:
Writing a plugin (not necessarily r4 specific) that changes the semantics of objects based on context (i.e. turning a file into a dir) is a bad idea IMHO.
Right.
Quoted 2 lines
Actually, BSD has this double-semantic to a limited degree: you can call
/usr/bin/vi /usr/binand get some binary representation of readdir.
How is that useful? read(2) errors out on a directory, and that is fine with me. If xemacs wants to do funky stuff when opening a directory, it is free to notice that special case and do something (readdir(3) and its ilk are quite useful here) about it.
[Yes, I did work on some boxen where you could read directories, but with
the current variety of filesystems (and corresponding directory formats!) in Linux this way lies utter madnes.]
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
Quoted 6 lines
By making Everything possible through echo, you are violating the unix philosophy that one tool should do one thing (though echo does just that).
...
And in this case, echo would be chown, chmod, tar, bzip2 all at once.
This is a mischaracterization of the one tool one function rule. This is like saying a hammer is a multi-tool because it builds both sheds and decks. Echo does one thing -- write to stdout. Echo doesn't know what chown, chmod, tar, or bzip2 is. Echo contains no code specific to those and its documentation doesn't mention them.
The partner of the one tool one job rule is the small, general building block rule. It lets the user combine several one-job tools in lots of combinations to achieve what others would achieve with a single multi-job tool. The reiser4 approach is thus more Unix than the traditional approach, as you don't need an array of specialized tools (chown, chmod, etc) to do an array of particular jobs.
--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems