silent semantic changes with reiser4
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
"Spam" == Spam <[email protected]> writes:
Quoted 4 lines · Rik van Riel
Quoted 3 lines · Hans Reiser
Why are you guys even considering going to any pain at all to distort semantics for the sake of backup? tar is easy, we'll fix it and send in a patch.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
It's not as easy as you make it out, and not just because there are a few dozen backup programs that need fixing.
The problem is more fundamental than that. Some of the file streams proposed need to be backed up, while others are alternative presentations of the file, which should not be backed up.
Spam>> No, not really. This is a user decision and should be options in
Spam>> the backup software. I don't think it is up to the kernel, Spam>> filesystem, or the OS in general to decide what information the Spam>> user want to retain or not.
Quoted 4 lines
Why not just define an attribute named something like "do-not-backup"? Then whatever program that generates the thumbnail can automatically add the do-not-backup bit, and the backup software knows to ignore it. (Obviously, that bit should apply recursively down the subtree.)
This is about the same idea as the archive flag in DOS/Windows environments. It didn't really work to well IMO. If meta files are definable by users/application then the backup system could create its own meta files with the specific information it needs.
~S
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Spam" == Spam <[email protected]> writes:
Quoted 5 lines · Hubert Chan
Why not just define an attribute named something like "do-not-backup"? Then whatever program that generates the thumbnail can automatically add the do-not-backup bit, and the backup software knows to ignore it. (Obviously, that bit should apply recursively down the subtree.)
Spam> This is about the same idea as the archive flag in DOS/Windows
Spam> environments. It didn't really work to well IMO.
Similar, but not the same. IIRC, the purpose of the archive flag was to mark which files had been modified since the last backup, wherein you get into conflicts if you have several backup-like utilities. (I'm trying to forget about the DOS days. ;-) ) A do-not-backup attribute would flag that a file should never be backed up.
Spam> If meta files are definable by users/application then the backup Spam> system could create its own meta files with the specific Spam> information it needs.
Signature · 4 lines
Hubert Chan <[email protected]> - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Spam" == Spam <[email protected]> writes:
Spam> This is about the same idea as the archive flag in DOS/Windows
Spam> environments. It didn't really work to well IMO. If meta files Spam> are definable by users/application then the backup system could Spam> create its own meta files with the specific information it needs.
True enough. Sometimes you'll want to backup the thumbnail, sometimes you won't.
Signature · 4 lines
Hubert Chan <[email protected]> - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
Quoted 7 lines · Rik van Riel
Currently I see no way to distinguish between the stuff that should be backed up and the stuff that shouldn't.
We create filename/pseudos/backup, and that tells the archiver what to do.....
Quoted 2 lines · Hans
We create filename/pseudos/backup, and that tells the archiver what to do.....
Instead of exposing the old semantics under a new interface, why not expose the new semantics under a new interface.
There exist plenty of programs that know the old Unix semantics. There don't exist many working programs that use the new semantics that you're adding.
I raise again the example of how Windows adapted to long filenames. Old DOS and FAT programs, including my Unix backups of today, see a 8.3 name space. Only code that knows the new magic sees the long names.
If given the choice of breaking much old, existing stuff, or some new, mostly not yet existing stuff, does not it make more sense to break what mostly doesn't exist yet?
One possible way to do this, of no doubt many:
* Stealing a corner of the existing filename space for some magic names with the new semantics.
* A new option on open(2), hence opendir(3), that lights up these magic names.
* Doing any of the classic pathname calls with such a new magic name exposes the new semantics - such calls as:
access execve mkdir mknod mount readlink rename rmdir stat truncate unlink
This means essentially constructing a map between old and new, such that changes made in either view are sane and visible from the other view.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373Quoted 6 lines · Paul Jackson
Quoted 2 lines · Hans
We create filename/pseudos/backup, and that tells the archiver what to do.....
Instead of exposing the old semantics under a new interface, why not expose the new semantics under a new interface.
yeah. that could work.
Quoted 26 lines
There exist plenty of programs that know the old Unix semantics. There don't exist many working programs that use the new semantics that you're adding.
I raise again the example of how Windows adapted to long filenames. Old DOS and FAT programs, including my Unix backups of today, see a 8.3 name space. Only code that knows the new magic sees the long names.
If given the choice of breaking much old, existing stuff, or some new, mostly not yet existing stuff, does not it make more sense to break what mostly doesn't exist yet?
One possible way to do this, of no doubt many:
* Stealing a corner of the existing filename space for some magic names with the new semantics.
* A new option on open(2), hence opendir(3), that lights up these magic names.
* Doing any of the classic pathname calls with such a new magic name exposes the new semantics - such calls as:
access execve mkdir mknod mount readlink rename rmdir stat truncate unlink
Quoted 3 lines
This means essentially constructing a map between old and new, such that changes made in either view are sane and visible from the other view.
It would be intresting to hear comments from Hans Reiser on proposals stated above...
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Quoted 18 lines · Alexander Lyamin
Quoted 15 lines · Paul Jackson
One possible way to do this, of no doubt many:
* Stealing a corner of the existing filename space for some magic names with the new semantics.
* A new option on open(2), hence opendir(3), that lights up these magic names.
* Doing any of the classic pathname calls with such a new magic name exposes the new semantics - such calls as:
access execve mkdir mknod mount readlink rename rmdir stat truncate unlink
Quoted 11 lines
Quoted 5 lines
This means essentially constructing a map between old and new, such that changes made in either view are sane and visible from the other view.
It would be intresting to hear comments from Hans Reiser on proposals stated above...
just use a view, and skip the options on the system calls. if you cd to /nometas/your_home_directory_path you don't see the metafiles. Why is a view better than a syscall flag? Because it lets the user choose what he wants without recompiling to do it. This kind of a view requires no coding because you can just mount the root filesystem two ways, one with the -nopseudos mount option, and one without it.
Quoted 6 lines · Hans Reiser
just use a view, and skip the options on the system calls. if you cd to /nometas/your_home_directory_path you don't see the metafiles. Why is a view better than a syscall flag? Because it lets the user choose what he wants without recompiling to do it. This kind of a view requires no coding because you can just mount the root filesystem two ways, one with the -nopseudos mount option, and one without it.
*What*?
OK, now I want detailed explanation of the reasons why that doesn't create cache coherency problems.
Do you have an analysis of locking in the entire thing?
Quoted 10 lines · On Sun, Aug 29, 2004 at 07:36:29PM +0100…
Quoted 3 lines
he wants without recompiling to do it. This kind of a view requires no coding because you can just mount the root filesystem two ways, one with the -nopseudos mount option, and one without it.
*What*?
OK, now I want detailed explanation of the reasons why that doesn't create cache coherency problems.
Do you have an analysis of locking in the entire thing?
And I am very, very serious about that - we are talking about very nasty minefield and design choices in that area have fundamental impact on the entire layer, wherever it is located.
It's *NOT* something that you can leave until later and hope it somehow falls into place - it can be merged in steps, but you MUST know the goal on that level. To rearchitect later might be possible (even though you will a hell of a time avoiding plugins breakage), but it will be *hard*.
Quoted 15 lines · [email protected] wrote:
Quoted 11 lines · On Sun, Aug 29, 2004 at 07:36:29PM +0100…
Quoted 3 lines
he wants without recompiling to do it. This kind of a view requires no coding because you can just mount the root filesystem two ways, one with the -nopseudos mount option, and one without it.
*What*?
OK, now I want detailed explanation of the reasons why that doesn't create cache coherency problems.
Do you have an analysis of locking in the entire thing?
Quoted 12 lines
And I am very, very serious about that - we are talking about very nasty minefield and design choices in that area have fundamental impact on the entire layer, wherever it is located.
It's *NOT* something that you can leave until later and hope it somehow falls into place - it can be merged in steps, but you MUST know the goal on that level. To rearchitect later might be possible (even though you will a hell of a time avoiding plugins breakage), but it will be *hard*.
How about if you educate me on the problems you see for a bit before I respond? I think it might help us move into a constructive discussion.
You are more experienced with your code than I am.... but I firmly believe that having different views of the same filesystem in which some files are visible in one view but not in another is technically feasible for some VFS, though I'd like to learn about the problems you see for doing it in the current VFS.
Quoted 2 lines · Hans Reiser
How about if you educate me on the problems you see for a bit before I respond? I think it might help us move into a constructive discussion.
A slew of cache coherency issues (and memory consumption on top of that). Rigth now we have a signle dentry tree for all fs instances, no matter how many times it and its subtrees are visible in the tree. Which, obviously, avoids all that crap. As soon as we start trying to have multiple trees over the same fs, we are in for a *lot* of fun.
The basic question is how do you propagate the changes from one tree to another and what do you do when change to "invisible" entry happens via a tree where it is visible. Unfortunately, all obvious solutions either hit the pathname resolution and hit it *hard* (both in scalability and in price of uncontended case) or create a mess for stuff like NFS silly-rename semantics, VFAT aliases, etc.
Saying that some unspecified data structures might work doesn't help. obviously - any variant will have tradeoffs of its own and has to be discussed individually. fsdevel is there for exactly that sort of stuff, so if you have any specific proposals you want to discuss, you are more than welcome.
Again, right now all cache coherency issues are sidestepped by having a single instance of dentry tree per superblock. Each mount/binding is represented by vfsmount and _refers_ to a (sub)tree of dentry tree of that fs - dentries and inodes are the same (ditto for private data structures owned by filesystem, obviously).
So we have a forest of dentry trees (one per filesystem) and forest of vfsmount trees (one tree per namespace). Each vfsmount corresponds to a chunk of namespace - think of the full user-visible tree cut into pieces by mountpoints. For every piece we know
a) what fs it's from (->mnt_sb) b) what subtree of that fs it corresponds (->mnt_root) c) what piece it's attached to (->mnt_parent) d) where in that piece it's attached (->mnt_mountpoint) e) where to find its siblings and children f) which namespace (== tree in vfsmount forest) it's from
Point in a namespace is determined by pair (vfsmount, dentry) - which piece we are looking at and where in that piece we are. Pathname lookups operate on such pairs - as long as we do not cross into another piece we just step from dentry to dentry, when we cross mountpoint towards root, we flip to (mnt_parent, mnt_mountpoint) first, when we cross mountpoint into mounted filesystem, we do hash lookup (lookup_mnt()) by our pair, find vfsmount with such mnt_parent and mnt_mountpoint and step into (vfsmount, vfsmount->mnt_root).
Lifetime of vfsmounts is controlled by a simple refcount. Having vfsmount attached to tree contributes +1, so does having it pinned down by lookup/ chdir/chroot/opened file. When the last vfsmount goes away, filesystem is shut down (basically, that's what happens on umount). Binding simply creates a vfsmount pointing to target and attaches it at source.
Cloning a namespace copies the vfsmount tree of parent process' namespace and flips vfsmounts of our root and cwd into the corresponding nodes in that copy. Normally, fork()/clone() just increments namespace refcount instead of cloning it, so all children share namespace with parent.
When all processes in a namespace are gone its refcount goes to zero. At that point we dissolve all attachments in its vfsmount tree (which drops a reference to each vfsmount and can in turn lead to fs shutdowns).
Lazy umount does similar operation with specified subtree - it detaches all pieces mounted anywhere in that subtree and drops reference to each. Ones that are not busy will be shut down immediately, ones that are will go away as soon as they stop being busy.
vfsmounts can have flags of their own - one of the pending projects is to allow individual vfsmounts to be read-only. Noexec, nosuid and nodev are already per-mountpoint.
Tree of vfsmounts is protected by
a) vfsmount spinlock (protects hash lookups, mostly)
b) per-namespace semaphore (that one is obviously blocking)
c) in cases when we can go from 0 to 1 vfsmounts with given dentry
as a mountpoint, we also hold ->d_inode->i_sem on the mountpoint-to-be (that closes races between rmdir/mount, rename/mount, etc.)
Dentry tree is messier - these days we have dcache_lock and RCU stuff. If you can help getting the documentation out of these guys, you've got a *lot* of thanks from a lot of people. As it is, it's RTFS country. I can answer specific questions there, but I won't even try to produce readable manual covering the entire thing.
Directory operations have exclusion based on ->i_sem - see Documentation/filesystems/directory-locking for description and proof of correctness.
For operations that can destroy an object (unlink/rmdir/overwriting rename) we try to unhash the victim dentry first, so the filesystems that can't handle unlinked-but-busy stuff can detect such attempt by seeing the victim still hashed _and_ can be sure that if it's not hashed, nobody will come and see it (lookup would have to go to filesystem code, since we have the sucker unhashed and we have exclusion there). If operation is unsuccessful, we rehash the victim.
Files involved:
fs/dcache.c
fs/super.c
fs/inode.c
fs/namespace.c
include/linux/dcache.h
include/linux/fs.h
include/linux/mount.h
If you need more details on any specific area (or gaps in the above) - just ask.
Quoted 6 lines · On Sun, 29 Aug 2004 [email protected] wrote:
A slew of cache coherency issues (and memory consumption on top of that). Rigth now we have a signle dentry tree for all fs instances, no matter how many times it and its subtrees are visible in the tree. Which, obviously, avoids all that crap. As soon as we start trying to have multiple trees over the same fs, we are in for a *lot* of fun.
Al, I think you should make the argument a bit more specific, because I doubt a lot of people understand just what the problems are with aliased names. Just a few examples of the problems involved will illuminate things very well, I think. People who haven't been intimate with the name caches probably simply don't understand why you worry so much.
I'll start out with some trivial examples, just to let Hans and others get an idea about what the issues are. I think examples of problems are often better ways to explain them than the abstract issues themselves.
Aliases: let's say that you have filename "a" hard-linked to filename "b", and you have a directory structure of streams under there. So you have
a/file1 a/dir1/file2 a/dir2/file3
and (through the hard-link with "b") you have aliases of all these same names available as "b/file1", "b/dir1/file2" etc).
Now, imagine that you have two processes doing
mv a/dir1 a/dir2/newdir
and
mv b/dir2 b/dir1/newdir
at the same time. Both of them MUST NOT SUCCEED, for pretty obvious reasons (you'd have moved two directories within each other, and now neither would be accessible any more).
How do you handle locking for this situation?
Another interesting case is what happens when you have looked up and cache the filename "a/file1" and then another process does "rm b/file1". How do you update the _other_ cached copy, since they had two different names, but _both_ names went away at the same time. Also again, how do you handle locking?
The general VFS layer has a lot of rules, and avoids these problems by simply never having aliases between two directories. If the same directory shows up multiple times (which can happen with bind mounts), they have the exact same dentry for the directory, it's just found through two different vfsmount instances. That's why vfsmounts exist - they allow the same name cache entry to show up in different places at the same time.
So when we do a bind mount, and the same directory shows up under two different names "a" and "b", and we do a "rm b/file1", it _automatically_ disappears from "a/file1" too, simply by virtue of "a" and "b" literally being the same dentry. No aliasing ever happens, and this makes coherency and locking much easier (which is not to say that they are trivial, but they are pretty damn clear in comparison to the alternatives).
What Al (and others) worries about is that the reiser4 name handling has _none_ of these issues figured out and protected against. You can protect against them by taking very heavy locks (you can trivially protect against all races by taking one large lock around any operation), but the fact is, that is just not an option for high-performance name lookup.
These aliasing/locking rules need to be global and wll-though-out. Not just fix the two examples above, but be shown to be safe _in_general_.
Linus
A message that is not in the archive (sent off-list or not yet received): [email protected]
[ Linux-kernel cc'd, because I don't think the question is stupid, and I
can't even fully answer the kNFSd thing other than point to it as a problem. ]
Quoted 4 lines · Grzegorz Kulewski
Sorry if my qestion is stupid, but why can't we deal with (hard)links to directories in (nearly) same way we deal with bind mounts (= making exactly one object representing target and only referencing to it)?
On a VFS level we could, these days, I think. But realize that bind mounts and the vfsmounts are pretty recent things.
We don't have any filesystems that support the notion, though, and we don't have any interfaces for the filesystem to tell us about it right now. The VFS layer could try to figure it out on its own from aliasing information, so the latter may be a non-issue, but the former is why nobody does it.
And even if Linux _these days_ could handle hardlinked directories, the fact is that they would cause slightly more memory usage (due to the vfsmounts), and that nobody else can handle such filesystems - including older versions of Linux. So nobody would likely use the feature (not to mention that nobody is even really asking for it ;).
And the lack of filesystem support is not theoretical. It's not easy to just retrofit directory hardlinks on a UNIX filesystem. The ".." entry actually exists on _disk_ on traditional unix filesystems, and with hardlinks on directories, that's a real problem. A hardlinked directory has multiple parents.
Also, while the VFS layer no longer cares (to it, ".." is purely virtual, and it never uses it), the NFS export routines still do actually want to get the on-disk parent. A filesystem that can't do that may be unable to be exported with full semantics (ie you might get ESTALE errors after server reboots, although you'd have to ask somebody with more kNFSd knowledge than me on exactly why that is the case ;)
Linus
Quoted 6 lines · Linus Torvalds
Quoted 3 lines
Sorry if my qestion is stupid, but why can't we deal with (hard)links to directories in (nearly) same way we deal with bind mounts (= making exactly one object representing target and only referencing to it)?
On a VFS level we could, these days, I think. But realize that bind mounts and the vfsmounts are pretty recent things.
Bindings won't replace hardlinks.
a) lifetime rules and keeping stuff busy
b) who's bound on top? Note that for real hardlinks to directories
(not just "directory on top of file" hybrids) it's a serious question
c) for real hardlinks we would want at least rename() working
Quoted 8 lines · On Sunday August 29, [email protected] wrote:
Also, while the VFS layer no longer cares (to it, ".." is purely virtual, and it never uses it), the NFS export routines still do actually want to get the on-disk parent. A filesystem that can't do that may be unable to be exported with full semantics (ie you might get ESTALE errors after server reboots, although you'd have to ask somebody with more kNFSd knowledge than me on exactly why that is the case ;)
The VFS requires all directories to have full paths from the filesystem root in the dcache. This is needed for loop detection when renaming directories.
suppose and NFS client: (UPPERCASE words refer to file handles)
Says "lookup ROOT 'a'" and gets A (file handle for /a)
Says "lookup A 'b'" and gets B (file handle for /a/b)
waits for /a and /a/b to be flushed from the dcache
Says "RENAME ROOT 'a' to B 'z'" (i.e. asks for /a to be moved to /a/b/c)
how can the VFS detect that that is not allowed? It needs to know that B is a subdirectory of /a. The complete path cannot fit in filehandle, so to needs to be computed by repeated lookup of "..", which must be on disk.
Even without that, storing ".." on disk makes lots of sense for fsck-like tools.
NeilBrown
Quoted 6 lines · On Sun, 29 Aug 2004 15:37:16 -0700 (PDT) Linus Torvalds <[email protected]>…
[...]
And even if Linux_thesedays_could handle hardlinked directories, the fact is that they would cause slightly more memory usage (due to the vfsmounts), and that nobody else can handle such filesystems - including older versions of Linux. So nobody would likely use the feature (not to mention that nobody is even really asking for it ;).
Huh? Me about a year ago ;-)
Been in fact pretty much boo'd for it :-)
I therefore declare as this years hot issue:
How to use more than 32 GIDs on nfs? Frank van Maarseveens' patch being available for years I guess, but with 2.6 supporting lots of GIDs becoming very actual...
:-)))
Sorry for being a bit off-topic but shouldn't we first solve the obvious (broken) and simple issues around fs?
Regards,
Stephan
Quoted 3 lines · Stephan von Krawczynski
I therefore declare as this years hot issue:
How to use more than 32 GIDs on nfs? Frank van Maarseveens' patch being
^^
The limit for NFS is 16.
Quoted 2 lines
available for years I guess, but with 2.6 supporting lots of GIDs becoming very actual...
thank you for reminding me that I still need to port it to 2.6. The patch came into existence around 2.2.17 IIRC.
Signature · 1 line
Frank
Quoted 6 lines · On Thu, 2 Sep 2004 13:26:23 +0200 Frank van Maarseveen <[email protected]>…
Quoted 3 lines · Stephan von Krawczynski
I therefore declare as this years hot issue:
How to use more than 32 GIDs on nfs? Frank van Maarseveens' patch being^^The limit for NFS is 16.
Yes, of course. Sorry for that exaggeration ;-)
Quoted 5 lines
Quoted 2 lines
available for years I guess, but with 2.6 supporting lots of GIDs becoming very actual...
thank you for reminding me that I still need to port it to 2.6. The patch came into existence around 2.2.17 IIRC.
Oh it will be very welcome once your done, the only way to circumvent the situation currently is to give world-rights, which is of course _bad_.
Thanks in advance for this patch,
Stephan
På su , 29/08/2004 klokka 17:50, skreiv Linus Torvalds:
Quoted 6 lines
The general VFS layer has a lot of rules, and avoids these problems by simply never having aliases between two directories. If the same directory shows up multiple times (which can happen with bind mounts), they have the exact same dentry for the directory, it's just found through two different vfsmount instances. That's why vfsmounts exist - they allow the same name cache entry to show up in different places at the same time.
So could you explain what is stopping us from reducing the whole problem to the bind mount problem? IOW have "a/" be a directory that acts as if it is dynamically bind mounted on top of the file "a".
Is it just the fantasy of supporting hard-links across "stream boundaries" (as in "touch a b; ln b a/b; ln a b/a")? I'm pretty sure nobody wants to have to add cyclic graph detection to their filesystems anyway. 8-)
What other issues would need to be addressed?
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 13 lines · Trond Myklebust
På su , 29/08/2004 klokka 17:50, skreiv Linus Torvalds:
Quoted 6 lines
The general VFS layer has a lot of rules, and avoids these problems by simply never having aliases between two directories. If the same directory shows up multiple times (which can happen with bind mounts), they have the exact same dentry for the directory, it's just found through two different vfsmount instances. That's why vfsmounts exist - they allow the same name cache entry to show up in different places at the same time.
So could you explain what is stopping us from reducing the whole problem to the bind mount problem? IOW have "a/" be a directory that acts as if it is dynamically bind mounted on top of the file "a".
Quoted 6 lines
Is it just the fantasy of supporting hard-links across "stream boundaries" (as in "touch a b; ln b a/b; ln a b/a")? I'm pretty sure nobody wants to have to add cyclic graph detection to their filesystems anyway. 8-)
What other issues would need to be addressed?
Go upthread and read.
Quoted 4 lines · Trond Myklebust
So could you explain what is stopping us from reducing the whole problem to the bind mount problem? IOW have "a/" be a directory that acts as if it is dynamically bind mounted on top of the file "a".
Hey, I suggested people do exactly that. See the other thread between me and Al Viro on exact implementation issues - even some code snippets ;)
The problem really ends up being directories with attributes (where we can't just overmount the existing directory). That's where "openat()" helps us.
(The other problem is the purely _practical_ problem of reiser4 going behind the VFS layer, and thus _not_ getting the aliasing and locking right, but that's an implementation issue in my book, and nothing really fundamental).
Quoted 4 lines
Is it just the fantasy of supporting hard-links across "stream boundaries" (as in "touch a b; ln b a/b; ln a b/a")? I'm pretty sure nobody wants to have to add cyclic graph detection to their filesystems anyway. 8-)
It's easy enough to do the graph detection at the VFS layer, exactly because of the density of the dentry graph.
(Of course, nfs-exporting a filesystem breaks that density, thanks to the "lookup by fh" stuff, so we might not allow it for an NFS client).
I suspect most filesystems wouldn't allow hard-links across "stream boundaries" in the first place. I _suspect_ that most stream implementations would bind the attributes more tightly than that to the file that owns them. reiser4 migth be the only one that might ever support something like that.
Quoted 1 line
What other issues would need to be addressed?
- Whether we want it in the first place
- whether we need the "separate namespace" thing that O_XATTR and openat() brings us (they certainly solve the problem, but maybe it is solvable another way too)
- how to actually test this out in practice (ie getting reiser4 to do the proper thing wrt the VFS layer, but preferably _also_ having another filesystem like NFSv4 or cifs that actually uses this and shows what the problems are).
- whether it makes any sense at all unless we also make at least a few other filesystems support it, so that people start using it as an "expected feature" rather than a "works only on a couple of machines".
And probably others.
Linus
På su , 29/08/2004 klokka 19:54, skreiv Linus Torvalds:
Quoted 3 lines
The problem really ends up being directories with attributes (where we can't just overmount the existing directory). That's where "
openat()" helps us.
Well, yes there has to be a distinction between a true bind mount which actually covers the file or directory, and something like the stream "bind mount" which doesn't.
The stream "bind mount" is just there to allow you to root the attributes in a single tree. It can be made functionally entirely equivalent to the openat(), but uses pathname semantics (e.g., "//") to denote the attribute fork instead of an extra function call.
Quoted 7 lines
Quoted 4 lines
Is it just the fantasy of supporting hard-links across "stream boundaries" (as in "touch a b; ln b a/b; ln a b/a")? I'm pretty sure nobody wants to have to add cyclic graph detection to their filesystems anyway. 8-)
It's easy enough to do the graph detection at the VFS layer, exactly because of the density of the dentry graph.
Don't you end up having to lock the entire paths b/c/d and a/e/f in order to prevent "ln a b/c/d/a; ln b a/e/f/b"?
Quoted 6 lines
Quoted 1 line
What other issues would need to be addressed?
- how to actually test this out in practice (ie getting reiser4 to do the proper thing wrt the VFS layer, but preferably _also_ having another filesystem like NFSv4 or cifs that actually uses this and shows what the problems are).
As I said, NFSv4 can be made ready pretty quickly: Bruce is already finishing up the xattr implementation.
Quoted 3 lines
- whether it makes any sense at all unless we also make at least a few other filesystems support it, so that people start using it as an "expected feature" rather than a "works only on a couple of machines".
NTFS? ;-)
Cheers,
Trond
Quoted 9 lines · Trond Myklebust
Well, yes there has to be a distinction between a true bind mount which actually covers the file or directory, and something like the stream "bind mount" which doesn't.
The stream "bind mount" is just there to allow you to root the attributes in a single tree. It can be made functionally entirely equivalent to the
openat(), but uses pathname semantics (e.g., "//") to denote the attribute fork instead of an extra function call.
Using '//' would be nice, but would break real apps. If I remember correctly, POSIX specifies that '//' can be special at the _beginning_ of a path, but in the middle, it has to act like a single '/'.
And that's not just theory - it's quite common for programs to just concatenate a directory name (which may or may not end with a slash) with another path-name that starts with a slash. So you _will_ see existing scripts and programs using things like "/usr/include//sys/type.h", and they'd break if "//" would switch from "regular namespace" to "attribute namespace".
So I don't see any way to extend pathname semantics to distinguish between "directory contents" and "directory attribute stream".
Quoted 5 lines
Quoted 2 lines
It's easy enough to do the graph detection at the VFS layer, exactly because of the density of the dentry graph.
Don't you end up having to lock the entire paths b/c/d and a/e/f in order to prevent "ln a b/c/d/a; ln b a/e/f/b"?
That's not the problem - since it's in memory, we can just get the dcache lock, and do it locked for t least local filesystems.
However, being prodded by Andries, I think I'm wrong _anyway_. Since the dcache is only "dense" down one path to the root, and doesn't contain all the alternate ways of getting to a particular directory, I came to the conclusion that the VFS layer can't actually do cyclic detection after all...
So together with the fact that nobody really _wants_ hardlinks to directories, I think the right answer is "no". It's not a problem as long as the attributes streams are always tied to the file/directory they are attributes of - then the "directory link" is really just a file link, and can't cause any cycles.
Quoted 7 lines
Quoted 4 lines
- how to actually test this out in practice (ie getting reiser4 to do the proper thing wrt the VFS layer, but preferably _also_ having another filesystem like NFSv4 or cifs that actually uses this and shows what the problems are).
As I said, NFSv4 can be made ready pretty quickly: Bruce is already finishing up the xattr implementation.
Do we have any servers that implement it? I think NFSv4 might be a good test-case if so.
Quoted 5 lines
Quoted 3 lines
- whether it makes any sense at all unless we also make at least a few other filesystems support it, so that people start using it as an "expected feature" rather than a "works only on a couple of machines".
NTFS? ;-)
Hey, I see the smiley, but I'd still like to point out that not many people use it under Linux, and while I think writing to it might be stable these days, I don't believe named streams are necessarily going to materialize all that quickly..
Linus
Quoted 9 lines · Linus Torvalds
And that's not just theory - it's quite common for programs to just concatenate a directory name (which may or may not end with a slash) with another path-name that starts with a slash. So you _will_ see existing scripts and programs using things like "
/usr/include//sys/type.h", and they'd break if "//" would switch from "regular namespace" to "attribute namespace".So I don't see any way to extend pathname semantics to distinguish between "directory contents" and "directory attribute stream".
I do, actually. There might be a way and it is kinda-sorta similar to your openat() variant, but lives in normal namespace. No, I'm not too fond of that, but since we are discussing weird variants anyway...
a) associated directory tree of object is not automounted on top
of it. Instead of that, we always do detached vfsmount (and do it on demand - see below)
b) we have a bunch of pseudo-symlinks in /proc/<pid>/fd/ - same
kind as what we already have there, but instead of (file->f_vfsmount, file->f_dentry) they lead to associated vfsmount (allocated if needed). Once we get a reference to such guy, we can
* do further lookups
* chdir there and poke around
* hell, we can even bind it someplace (that will require slight change
in attach_mnt() logics, but it's not hard) and get it permanently mounted
Since it's not attached anywhere, normal GC logics works just fine. And yes, they are usable from scripts, etc. -
exec 42<foo/bar/baz cat /proc/self/fd/#42/whatever/crap/you/want
and enjoy.
Quoted 5 lines
However, being prodded by Andries, I think I'm wrong _anyway_. Since the dcache is only "dense" down one path to the root, and doesn't contain all the alternate ways of getting to a particular directory, I came to the conclusion that the VFS layer can't actually do cyclic detection after all...
<blinks>
<rereads a bunch of earlier postings>
Oh, _that_'s what you meant... No, we definitely have no chance in hell to catch loops, dcache or not. It costs too much - we need to examine a *lot* of nodes to do that and all of them would have to be read at some point. We either need entire fs tree locked in core or we might have to reread it on every rename(). The former will kill us on memory use, the latter - on amount of IO.
Quoted 8 lines · On Mon, 30 Aug 2004 [email protected] wrote:
Quoted 3 lines
So I don't see any way to extend pathname semantics to distinguish between "directory contents" and "directory attribute stream".
I do, actually. There might be a way and it is kinda-sorta similar to your
openat()variant, but lives in normal namespace. No, I'm not too fond of that, but since we are discussing weird variants anyway...
Quoted 11 lines
a) associated directory tree of object is not automounted on top
of it. Instead of that, we always do detached vfsmount (and do it on demand - see below)
b) we have a bunch of pseudo-symlinks in /proc/<pid>/fd/ - same
kind as what we already have there, but instead of (file->f_vfsmount,file->f_dentry) they lead to associated vfsmount (allocated if needed). Once we get a reference to such guy, we can
* do further lookups
* chdir there and poke around
* hell, we can even bind it someplace (that will require slight change
inattach_mnt()logics, but it's not hard) and get it permanently mounted
Well, the above _is_ the same as "openat()", really. It's just using a filesystem starting point to emulate a new system call. Same thing conceptually. You could do pretty much any system call as a filesystem action if you wanted to ;)
I don't disagree with doing so - as a way to expose the new system call to scripts. But I don't think you're being entirely intellectually honest if you think this suddendly makes it be "one namespace". It's still a secondary namespace rooted in an entry in the normal ones - exactly like "openat()".
For a non-script, a native "openat()" interface would be more efficient and less confusing, and conceptually no different from yours. No reason we couldn't have both, since they are 100% equivalent and would share the same code anyway...
Linus
Quoted 4 lines · Linus Torvalds
Well, the above _is_ the same as "
openat()", really. It's just using a filesystem starting point to emulate a new system call. Same thing conceptually. You could do pretty much any system call as a filesystem action if you wanted to ;)
Umm... Yes and no - open() is not the only thing you can do there. You can emulate some of the other stuff with open() + fchdir() + syscall, but... Note that it also gives you access to other tasks' files (provided that tasks are yours, so you can get to their /proc/.../fd).
Quoted 5 lines
I don't disagree with doing so - as a way to expose the new system call to scripts. But I don't think you're being entirely intellectually honest if you think this suddendly makes it be "one namespace". It's still a secondary namespace rooted in an entry in the normal ones - exactly like "
openat()".
Well - it *does* expose these objects to all normal syscalls. E.g. you can unlink() a component in there without
fd2 = open(".", ...);
fd3 = openat(fd, ".", ....)
fchdir(fd3);
unlink("blah");
fchdir(fd2);and similar horrors (now have fun adding locking for multithreaded process, etc.).
In that sense it is, indeed, the same namespace.
Quoted 4 lines
For a non-script, a native "
openat()" interface would be more efficient and less confusing, and conceptually no different from yours. No reason we couldn't have both, since they are 100% equivalent and would share the same code anyway...
I'm not sure that openat() is the right interface for e.g. fileservers. And no, I'm not saying that above is suitable for them - IMO neither variant is what they need. The thing is, fileserver almost certainly wants to create and remove objects. And you either end up with new syscalls for doing *that* relative to opened fd or you do tons of fchdir(), which makes benefits of openat() dubious in the best case.
Arguments about O_NOFOLLOW on the intermediate stages are bullshit, IMNSHO - if they want to make some parts of tree inaccessible, they should simply mkdir /tmp/FOAD; chmod 0 /tmp/FOAD; mount --bind /tmp/FOAD <blocked path> in the namespace their daemon is running in. And forget all that crap about filtering pathnames and blocking symlinks on intermediate stages (the latter is obviously worthless without the former since one can simply substitute the symlink body in the pathname).
Quoted 7 lines · On Mon, Aug 30, 2004 at 05:46:37AM +0100…
Arguments about
O_NOFOLLOWon the intermediate stages are bullshit, IMNSHO - if they want to make some parts of tree inaccessible, they should simply mkdir/tmp/FOAD; chmod 0/tmp/FOAD; mount --bind/tmp/FOAD<blocked path> in the namespace their daemon is running in. And forget all that crap about filtering pathnames and blocking symlinks on intermediate stages (the latter is obviously worthless without the former since one can simply substitute the symlink body in the pathname).
Ehh... After looking at that for a while... No, it's not that simple and removing the stuff that way won't do what these guys want, at least not without something else. Frankly, what I've seen worries me a lot - it looks like there is a missing primitive here that would be saner than this sort of filtering.
It appears that most of this stuff would be covered by a fast way to tell if the resulting object belongs to given subtree. That could be arranged (not without some changes, but doable), but I'm not sure that it's enough to cover the stuff they are really trying to do. It does look like an interesting problem and current solutions certainly suck. And I very much doubt that "do a lookup if it doesn't run into anything that could be too tricky for our pathname-based checks, otherwise let's do it step-by-step from userland" is the right approach here.
På su , 29/08/2004 klokka 22:31, skreiv Linus Torvalds:
Quoted 5 lines
So together with the fact that nobody really _wants_ hardlinks to directories, I think the right answer is "no". It's not a problem as long as the attributes streams are always tied to the file/directory they are attributes of - then the "directory link" is really just a file link, and can't cause any cycles.
Right.
Quoted 2 lines
Do we have any servers that implement it? I think NFSv4 might be a good test-case if so.
I believe Solaris Express already has an implementation, so I should have at least one server implementation available in the basement. So probably does Hummingbird, since their NFSv4 server runs on Windows.
CITI is working on the Linux code, but I'm not sure how far they've come on the server side. I'll ask Bruce in the morning...
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Linus Torvalds
Quoted 7 lines · Trond Myklebust
Quoted 4 lines
- how to actually test this out in practice (ie getting reiser4 to do the proper thing wrt the VFS layer, but preferably _also_ having another filesystem like NFSv4 or cifs that actually uses this and shows what the problems are).
As I said, NFSv4 can be made ready pretty quickly: Bruce is already finishing up the xattr implementation.
Do we have any servers that implement it? I think NFSv4 might be a good test-case if so.
I know the mention of it in the past has brought up ridicule, but netatalk requires some level of multi-stream support in the export to the client, and currently just emulates it on the server side by hiding the extra files in various directories. It should be possible to modify it to use named streams/attributes for the extra data. If that happens, it would be nice if hfs and hfsplus could export the data so it could be used. The view exported by netatalk does match the internal structure of hfs, after all.
(For those of you that aren't familiar with the Macintosh, a Mac style filesystem has two peer streams, data and resource. They are each a seekable bytestream, and are actually at the same level inside the filesystem. In addition, there is a large set of fixed length attributes stored, such as the file type info and icon position. In addition, hfsplus also supports full named streams and arbitrary metadata, tho that isn't used much.)
Brad Boyer
[email protected]
Quoted 3 lines · Linus Torvalds
Using '//' would be nice, but would break real apps. If I remember correctly, POSIX specifies that '//' can be special at the _beginning_ of a path, but in the middle, it has to act like a single '/'.
FWIW, QNX uses // for it's network fs (nfs?). //0/ means current node, //1/ first node, //2/ second, etc. I didn't even know posix said anything about // before.
Signature · 2 lines
Tom Vier <[email protected]> DSA Key ID 0x15741ECE
Trond Myklebust wrote on Sun, 29 Aug 2004 19:17:10 -0400:
Quoted 4 lines
Is it just the fantasy of supporting hard-links across "stream boundaries" (as in "touch a b; ln b a/b; ln a b/a")? I'm pretty sure nobody wants to have to add cyclic graph detection to their filesystems anyway. 8-)
Been there, done that. It works in a rough form in an experimental RAM file system for BeOS. But deleting files requires a graph traversal to see if it is isolating just one item or a whole bunch of them. It also implies keeping track of multiple parent directories for everything. It does make it useful for the user - you can have files and directories in multiple places, so you don't have to decide on one classification for a file (or directory). One other downside is a lot of locking complexity (or not if you don't need fine grained locking) to guarantee atomicity of the delete.
For user convenience, the low level delete function returns an error code if there is more than one item cut off from the root, but it could just as well delete all of them (sort of like rmdir giving an error if the directory isn't empty rather than just deleting everything).
- Alex
You are assuming that the hiding has to be embodied by the dentry cache. That sounds hard. Let's not do that; I am too lazy.
We can put it at a layer above that. Let us have a "mask" concept. For the purposes of this discussion, the mask can be made totally trivial and hardcoded, with none of the expressive power of my new DoD project, and can probably be coded in a few hours to exclude the metas. For my new DoD project we are creating a configurable, scalable, sophisticated "mask" abstraction, and you must successfully pass through the mask before you can ask if the filesystem contains X/Y/Z. (For the darpa project with the general purpose masks with specifications and all that we will take 6 months, not a few hours.)
The rest shall wait until after I get a bite to eat, ok?
Hans
Quoted 16 lines · [email protected] wrote:
Quoted 3 lines · Hans Reiser
How about if you educate me on the problems you see for a bit before I respond? I think it might help us move into a constructive discussion.
A slew of cache coherency issues (and memory consumption on top of that). Rigth now we have a signle dentry tree for all fs instances, no matter how many times it and its subtrees are visible in the tree. Which, obviously, avoids all that crap. As soon as we start trying to have multiple trees over the same fs, we are in for a *lot* of fun.
I think we have to either:
1) Link only to the file and not the directory in the file-directory duality. This means we change the semantics of hard link so that it only links to the data and the standard metadata, and the optional attributes/streams/files-in-directory are not seen by the second link. You can think of this as meaning that hard links only connect to the file and not the directory in the file-directory wave-particle duality
or, 2) we should ask Alexander Smith to help with applying the graph traversal cycle detection code that he wrote.
I can go either way contentedly for now. 2) is the right long term solution. 1) is probably the right short term solution.
Ok, Linus and Viro, now I see why it was hard. Being able to effectively connect to compound documents only with symlinks is a bit distasteful, but it is quite livable, and I very much hope you decide it is better than fragmenting the namespace.
Hans
Hans Reiser wrote on Mon, 30 Aug 2004 00:42:13 -0700:
Quoted 2 lines
or, 2) we should ask Alexander Smith to help with applying the graph traversal cycle detection code that he wrote.
I put my foot into it, didn't I? It's not too bad, one trick to simplify things is to have the concept of a main parent and step parents. The file system name space graph is kept structured so that by always going upward through the main parent, you're guaranteed to reach the root. It doesn't save anything on traversal when deleting files (you still have to visit all the relevant nodes to check for cycles), but allows you to replace hard links with a new kind of dynamic symbolic link. The hard link pretends to be a symbolic link presenting the "true path" to its target, which changes as the target moves around (so it's not as reliable as real hard link). Old software doesn't see the cycles in the graph, just follows the single true path to any particular object like it currently does, and sees a bunch of symbolic links to everything else. New software can see the full parent list (not just a single "..") and the actual hard links.
Quoted 4 lines
Ok, Linus and Viro, now I see why it was hard. Being able to effectively connect to compound documents only with symlinks is a bit distasteful, but it is quite livable, and I very much hope you decide it is better than fragmenting the namespace.
Still, having hard links to attributes or directories of attributes is useful. For example, if several contact manager entries reference the same person, it would be nice to have that represented as a hard link to the attribute directory tree describing that person. That's assuming you implement contacts (name, address, etc) as a bunch of attributes in a directory.
- Alex
Quoted 5 lines · Paul Jackson
Quoted 1 line · Hans
We create filename/pseudos/backup, and that tells the archiver what to do.....
Instead of exposing the old semantics under a new interface, why not expose the new semantics under a new interface.
Here's another take on the same theme. To see attrs on files, one can either use a newly developed application which can use special new syscalls/flags on syscalls a Paul Jackson recommends. However from an old shell or application one can also open the attribute node on /home/myself/foo.txt by checking out /attr/home/myself/foo.txt/, which points to the "as directory" node on the filesystem that foo.txt points to.
The strange part of this idea is that the /attr filesystem wouldn't be conventionally browsable. An opendir() on any path would return the attributes, not the subdirectory contents, even if the target was a conventional directory. File based operations (open(), unlink(), etc) would operate on the "as directory" node of the dirname() of the file argument. The /attr filesystem would be completely virtual, honoring the permissions, crossing filesystems, and inheriting the root directory of the calling process.
Just a thought from a Linux fs layman -- certainly one of the Reiser unwashed masses.
--
Paul
Quoted 8 lines · Paul Stewart
Here's another take on the same theme. To see attrs on files, one can either use a newly developed application which can use special new syscalls/flags on syscalls a Paul Jackson recommends. However from an old shell or application one can also open the attribute node on
/home/myself/foo.txtby checking out /attr/home/myself/foo.txt/, which points to the "as directory" node on the filesystem that foo.txt points to.
This is the same idea as Al Viro's /proc/self/fd/#42/attr issue, except yours has two fundamental problem: races and ambiguities.
If you open a filename in some "secondary" tree (be it /proc or //attr or whatever) based on the filename in the primary one, you have two issues that you need to work out:
- how do you handle a name change in the primary tree at the same time as lookup
- how do you handle the ambiguity of
//attr/usr/bin/emacs/icon
(is that the "icon" attribute on "/usr/bin/emacs", or is it perhaps the "emacs/icon" attribute on "/usr/bin").
The ambiguity can be handled by saying that attributes only have one component (ie only the _last_ component of a lookup is the attribute name). But the race between primary tree and secondary tree cannot be handled in a normal name-space.
What Al did was to avoid both by "fixing" the attribute lookup point with another open - _exactly_ the same way "openat()" handles it. So Al's naming convention avoids both the ambiguity and the primary tree name change races by first opening the primary tree file, and then explicitly using that file as the "anchor" in the secondary tree. He did it in /proc, where we obviously already do export an open fd as an anchor-point.
Quoted 2 lines
The strange part of this idea is that the /attr filesystem wouldn't be conventionally browsable.
That may make it non-intuitive to use, but that's not the real problem. See above.
Linus
Quoted 11 lines · Hans Reiser
Quoted 7 lines · Rik van Riel
Currently I see no way to distinguish between the stuff that should be backed up and the stuff that shouldn't.
We create filename/pseudos/backup, and that tells the archiver what to do.....
its ugly idea.
representations should be distinguished from sources. and its reasonably to put this distinguisher somewhere in namespace. but filename/pseudos/backup is plain ugly.
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Lyamin wrote:
| Fri, Aug 27, 2004 at 11:28:51AM -0700, Hans Reiser wrote: | |>Rik van Riel wrote: |> |> |>> |>>Currently I see no way to distinguish between the stuff |>>that should be backed up and the stuff that shouldn't. |>> |>> |>> |> |>We create filename/pseudos/backup, and that tells the archiver what to |>do..... | | | its ugly idea. | | representations should be distinguished from sources. and its reasonably | to put this distinguisher somewhere in namespace. but
filename/pseudos/backup
| is plain ugly.
How about filename/metas/serialized, or filename/metas/fschunk?
And I did mention before about how it'd be nice for it to be an fs chunk...
Imagine 5000 tiny little files that, by the time reiser's done with them, fit inside 5 blocks or so. It's insanely cheaper to copy the five blocks than to tar them up. It also means that we don't have to worry about supporting tar on other platforms -- if they don't have reiser4, they need a separate converter. If apps are going to use reiser4 metadata for anything significant, they probably would link against some sort of userland implementation of reiser4 as a Windows library, say, to access the files elsewhere.
That's extreme, but you get the idea.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQIVAwUBQTPKc3gHNmZLgCUhAQJ5xw//T+kLDCHlfQEaGM9XAeFDZU9f4m4PWjet n2xODVIxaT7WmnZ4nQ3rRTiJjsXvRBcPdWUTFRZl6NbLqa/K6ESpUJAZsZynRhXd NLJ9gEpeqcUrXBLrmTD5AbzENOLdqDIo2qQ+hde68H5vo+naa5xtTyrMiHNHQWbf 9P45WKXYt36madg4KjAhZcYB+T843fc/ItjLQBTwxBNOykBcZ82UUNwGeGbiqczm uXftCD6BNtKsXnJxu2jVc8CK93lOw4SIf7BY09PFXgK2XTpAsKzOwwqpBtdxSzqD lkz+nGEeYZk6GRA3N1OTbPJnboee7WHZzMyvXDMBsExfR6puV1SYA2NWhj9uGDmS nYNZwdN+RimiouD1D9DD+oCQe/Gr66THicex5FM37cMBdaDf0jGblvpDdQRfkhcX 2KGLCt1ax620ia2945/+/+6iQqM7+oTQsVNziYjVGQ4gCNRzZh8SBtM0yUZuecNO H84fWYLICGos+Qk7FyCuQOquTSVRWKadkiDaOSre2hFk+S9VmDWkghJSNGrnqoKi pFYFrUzL+NXPHs6G8b8EKAaQQt+Z8iHE6xgdc+yS56Pdrq8apRzeQv2zhgZaRq9J kCRgvYo40xFMX4B+EqexxIiwc6nPUD5dFbt0OnJMEk4pduFq64lMVdoQA8Qp4X8a 0feuVuaWHr0=
=ymeH
-----END PGP SIGNATURE-----
Quoted 3 lines · David Masover
And I did mention before about how it'd be nice for it to be an fs chunk...
Please define fs chunk. My mind has an open door.;-)
Quoted 11 lines
Imagine 5000 tiny little files that, by the time reiser's done with them, fit inside 5 blocks or so. It's insanely cheaper to copy the five blocks than to tar them up. It also means that we don't have to worry about supporting tar on other platforms -- if they don't have reiser4, they need a separate converter. If apps are going to use reiser4 metadata for anything significant, they probably would link against some sort of userland implementation of reiser4 as a Windows library, say, to access the files elsewhere.
That's extreme, but you get the idea.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hans Reiser wrote:
| David Masover wrote: | |> |> |> And I did mention before about how it'd be nice for it to be an fs |> chunk... | | | Please define fs chunk. My mind has an open door.;-)
I think this is sort of like dump/restore, but for a subset of the tree. ~ So it's faster for all the reasons dump/restore are faster than tar for a whole filesystem. But I don't know all that much about either dump/restore or reiser4 format plugins.
I'm defining an "fs chunk" as a complete, read-only reiser4 filesystem of the data in question. As a snapshot. I'm imagining it being faster to create and ultimately smaller and more intelligently packed than a tarball.
What if you could get a blocklist for a directory? Of course some things would have to be changed to completely divorce it from the parent filesystem and have it still be usable.
I'm imagining that literally grabbing a chunk of the filesystem -- using its own storage layer -- would be faster than tarring. Think like if directories had blocklists as well as files. It would also be smaller
- -- see below. And it completely eliminates the question of "what may I never back up" -- the fs already knows that. Without having to be told by plugins. If the fs stores it to disk, the backup stores it, unless it's part of the "cache" proposal.
This is a rough idea, and has issues. For instance, how do we know what's cache and what's not? If you have foo.gz/ugz cached and someone writes to foo.gz/ugz, I think that should be written to the cache and the original foo.gz should be removed -- regenerated if necessary from foo.gz/ugz. But the reverse is true -- write to foo.gz and foo.gz/ugz should go away, to be regenerated if necessary. Only one should go into the backup, though. I think foo.gz goes into the backup and is regenerated from foo.gz/ugz if necessary. More generally, when you have two redundant streams, backup the smaller one.
|> |> Imagine 5000 tiny little files that, by the time reiser's done with |> them, fit inside 5 blocks or so. It's insanely cheaper to copy the five |> blocks than to tar them up. It also means that we don't have to worry |> about supporting tar on other platforms -- if they don't have reiser4, |> they need a separate converter. If apps are going to use reiser4 |> metadata for anything significant, they probably would link against some |> sort of userland implementation of reiser4 as a Windows library, say, to |> access the files elsewhere. |> |> That's extreme, but you get the idea. | |
P.S. Sorry for the dupe, Hans, accidently hit "reply" instead of "reply-to-all"...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQIVAwUBQTUuS3gHNmZLgCUhAQKWCQ/+LTNqHvndRAMqzdAJ0rugZl30bqqPmrFs vNqSwEx09RUxN6caOd+C4F7oVj/as0AJrNqyN5YR6/t6BKGxh+xEDnKdKiIRR5qp /TJmsMSkh54MSqaZZPL5EB6/DjWscBN7zKCaaCN6f8xB6KU2BCOK5pNSHDvYhISA uyD8AXrsOLRGC82dNtmh68KdrG+7VcTZMohulXNnosLLRJSuKeYEphB0i5HrvXQn nZ010yb6LnmKtNKD+w7bFxt3ul+lQo8gti7zBJqb7mV4pa1MnQNhGZRgvey/Pq/l ahXrrABauUFNwM4PfFWUoY9zjOdCufQpWev/mNGuoo9BS2ZiRg8LXoUpf2bOvi6I yOTMRb37w6+w37Jv8B0vYPehW3bmuJpb+jDyZ5AYS0GygJmm3bEIFZYupYt2pU/v 7EBIzLszCEnqPbm0glGdWT5jyYiZGucvDK+W4qQ3ymEqaBIdGIti4G56mQ7bTQer DPVT4dv38OE/PEtKb6xLQUaos7hBg+sWM5+mT9B+7kX/cYDhtdBkZpYqf10jAg34 4ufl2NS48CxqCcml7RayPVAuKT1ZN9sDcfXVYnPw33R94/lziZnfJrIInbnf9MZK +P9v6WlFi6+9GZjwqFK9ZCJBoTCKRq1lGiy5flTDf1APAgpmU6CS/0Da4s1QiLLI YRoeX8Nv8Us=
=WFSh
-----END PGP SIGNATURE-----
Quoted 26 lines · --On Thursday, August 26, 2004 11:15:19 -0700 Linus Torvalds…
Quoted 4 lines · Rik van Riel
It's a relief to know that nobody's taking my humorous suggestion seriously, but now we still have the "standard Unix tools can't manipulate files" problem...
I disagree. They can manipulate the files a whole lot better than they can manipulate xattr's.
For example, you _could_ probably (but hey, maybe "tar" tries to strip slashes off the end of filenames, so this might not work due to silly reasons like that) back up a compound file with
tar cvf file.tar file file/
although unpacking it would require that tar be taught about the thing. And you definitely could write a script to do the thing, ie even with an unmodified tar you could do
tar cvf file-archive.tar file
cd file
tar cvf ../attribute-archive.tar .which is a hell of a lot better than what you can do with the fsattr interfaces and unmodified legacy applications.
Quoted 6 lines
So one of the advantages of "dir-as-file/file-as-dir" is exactly that you _can_ manipulate the data with legacy tools. Sure, things that traverse a directory tree might need some (likely fairly trivial) modifications if they really want to take advantage of the subfiles, but that's still likely to be _much_ less of an issue than with fsattr's that have a totally different model entirely.
What would "test -d" and "test -f" return on these magic beasties? I can't think of any combinations that wouldn't confuse the crap out of userspace.
M.
Quoted 3 lines · Martin J. Bligh
What would "test -d" and "test -f" return on these magic beasties? I can't think of any combinations that wouldn't confuse the crap out of userspace.
"It's a feature".
The S_ISDIR/S_ISREG tests show real information: it shows not only user intent ("you should consider this a file, even if it has attributes"), but also whether it is a directory or a container.
And there's a real technical difference there: the streams contained within a file are bound to that file. The files contained within a directory are _independent_ of that directory. Big difference. HUGE difference.
So it's not confusing. If it tests as a file, you think of it as a file. It may have attributes aka named streams associated with it, and you may be able to open those attributes by treating the file as a directory, but that doesn't really change the fact that it's a file.
The _big_ difference is that when you can make the compound object _look_ like a directory, that means that you can now manage the attributes with standard tools. They are still attributes, though.
Linus
Quoted 16 lines · Martin J. Bligh
Quoted 3 lines
What would "test -d" and "test -f" return on these magic beasties? I can't think of any combinations that wouldn't confuse the crap out of userspace.
"It's a feature".
The S_ISDIR/S_ISREG tests show real information: it shows not only user intent ("you should consider this a file, even if it has attributes"), but also whether it is a directory or a container.
And there's a real technical difference there: the streams contained within a file are bound to that file. The files contained within a directory are _independent_ of that directory. Big difference. HUGE difference.
Quoted 8 lines
So it's not confusing. If it tests as a file, you think of it as a file. It may have attributes aka named streams associated with it, and you may be able to open those attributes by treating the file as a directory, but that doesn't really change the fact that it's a file.
The _big_ difference is that when you can make the compound object _look_ like a directory, that means that you can now manage the attributes with standard tools. They are still attributes, though.
I think what you're saying is that they'd both return positive, right?
Unfortunately I think lots of code in userspace assumes files / directories are mutually exclusive conditions, and acts accordingly ... eg:
if [ -f file ]
do file stuff
else
do directory stuff
fi.
Now I'm not saying they're not broken ... but seems like a dangerous thing to change in the midst of a stable kernel series.
M.
Am Donnerstag, den 26.08.2004, 14:00 -0700 schrieb Martin J. Bligh:
Quoted 16 lines
Quoted 16 lines
"It's a feature".
The S_ISDIR/S_ISREG tests show real information: it shows not only user intent ("you should consider this a file, even if it has attributes"), but also whether it is a directory or a container.
And there's a real technical difference there: the streams contained within a file are bound to that file. The files contained within a directory are _independent_ of that directory. Big difference. HUGE difference.
So it's not confusing. If it tests as a file, you think of it as a file. It may have attributes aka named streams associated with it, and you may be able to open those attributes by treating the file as a directory, but that doesn't really change the fact that it's a file.
Quoted 5 lines
Quoted 3 lines
The _big_ difference is that when you can make the compound object _look_ like a directory, that means that you can now manage the attributes with standard tools. They are still attributes, though.
I think what you're saying is that they'd both return positive, right?
No. A file is still a file and S_ISREG will thus return false. The application should just try to open it as a directory if it wants to access the assiociated embedded attribute files. If the open fails, well, it knows that the filesystem (or Linux version, whatever) doesn't support this feature.
Quoted 2 lines · Martin J. Bligh
I think what you're saying is that they'd both return positive, right?
No. I'd say that a file would look like a file, even if it has attributes.
It wouldn't show as a directory at all - unless you start looking at attributes. Because it really _is_ a file, and it's "directory aspect" is really nothing but a way to make its named streams visible.
So you really should consider it a perfectly regular file, and so only S_ISREG() will return true, and S_ISDIR() will return false.
Think of it this way: when you add a named attribute to current files using the xattr interfaces, do you start thinking of the file as a directory? No. Even though it actually now is a starting point for finding more information.
It's just that thanks to it's directory aspect, people and apps that _care_ about the attributes suddenly can trivially access them. You can access them in shell scripts, you can access them in programs, you can access them in perl. With no special knowledge necessary.
Remember: in the file-as-directory model, we're always talking about just _one_ object. That one object just happens to have namd streams or attributes or whatever you want to call them associated with it, and you can _see_ them through the normal directory interfaces. But that doesn't really make the object a "directory". It's still a file.
In other words, the "directory" part is just a _view_ into the file. A view that potentially exposes a lot _more_ of the file, but we're still talking about the same file.
In contrast, a S_IFDIR-like _directory_ is something else entirely. When you view the things in that, you aren't looking at data "inside" the directory. You're looking at somethign totally independent.
Linus
Quoted 7 lines · Linus Torvalds
In other words, the "directory" part is just a _view_ into the file. A view that potentially exposes a lot _more_ of the file, but we're still talking about the same file.
In contrast, a S_IFDIR-like _directory_ is something else entirely. When you view the things in that, you aren't looking at data "inside" the directory. You're looking at somethign totally independent.
One of the constraints is that you can create any name in an S_IFDIR-like directory, but you probably can't create any name "in" an S_IFREG-like file, because the names have meaning -- except in designated subtrees of the view intended for holding arbitrary names.
-- Jamie
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Martin J. Bligh
I think what you're saying is that they'd both return positive, right?
Quoted 8 lines
No. I'd say that a file would look like a file, even if it has attributes.
It wouldn't show as a directory at all - unless you start looking at attributes. Because it really _is_ a file, and it's "directory aspect" is really nothing but a way to make its named streams visible.
So you really should consider it a perfectly regular file, and so only
S_ISREG()will return true, andS_ISDIR()will return false.
ie, logically:
S_ISREG() no longer precludes O_DIRECTORY from succeeding conversleyO_DIRECTORY succeeding no longer implies S_ISDIR()
However, apps making those assumptions will not notice new behaviour.
?
David
In article <57730000.1093554054@flay>,
Quoted 6 lines · Martin J. Bligh
Quoted 5 lines · Martin J. Bligh
Quoted 3 lines
What would "test -d" and "test -f" return on these magic beasties? I can't think of any combinations that wouldn't confuse the crap out of userspace.
I think what you're saying is that they'd both return positive, right?
test -f file -> true
test -f file/ -> false
test -d file -> false
test -d file/ -> true
Mike.
Signature · 2 lines
"In times of universal deceit, telling the truth becomes a revolutionary act." -- George Orwell.
Quoted 3 lines · * Linus Torvalds ([email protected]) wrote:
The _big_ difference is that when you can make the compound object _look_ like a directory, that means that you can now manage the attributes with standard tools. They are still attributes, though.
For things that actually use such attributes to determine file access, do the attributes get attributes?
thanks,
-chris
Signature · 1 line
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
Quoted 9 lines · Linus Torvalds
The S_ISDIR/S_ISREG tests show real information: it shows not only user intent ("you should consider this a file, even if it has attributes"), but also whether it is a directory or a container.
And there's a real technical difference there: the streams contained within a file are bound to that file. The files contained within a directory are _independent_ of that directory. Big difference. HUGE difference.
Quoted 4 lines
So it's not confusing. If it tests as a file, you think of it as a file. It may have attributes aka named streams associated with it, and you may be able to open those attributes by treating the file as a directory, but that doesn't really change the fact that it's a file.
What about the attributes/named streams of a directory though? If you open it as a directory, you would get the files inside the directory. So how do you get at the attributes and named streams of the directory itself using this interface?
Best regards,
Anton
Signature · 4 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
Quoted 9 lines · Rik van Riel
Quoted 4 lines · Linus Torvalds
Quoted 1 line
So all I need to do is "cat /bin | gzip -9 > /path/to/backup.tar.gz" ?
No no. The stream you get from a directory is totally _independent_ of the contents of the directory. Anything else would be pointless.
It's a relief to know that nobody's taking my humorous suggestion seriously, but now we still have the "standard Unix tools can't manipulate files" problem...
Is it possible to sufficiently hide "dirs inside files" so that old tools will be unable to see them?
I just checked:
ls -d /foo does lstat64("/foo", ...)
ls -d /foo/ does lstat64("/foo", ...)
but
ls -d /foo/. does lstat64("/foo/.", ...)
Will it work out if "dir inside file" will only be visible when referred as "file/."? --
vda
Quoted 3 lines · Denis Vlasenko
Is it possible to sufficiently hide "dirs inside files" so that old tools will be unable to see them?
Certainly possible.
Quoted 8 lines
I just checked:
ls -d /foo does
lstat64("/foo", ...)
ls -d /foo/ doeslstat64("/foo", ...)
but
ls -d /foo/. doeslstat64("/foo/.", ...)Will it work out if "dir inside file" will only be visible when referred as "file/."?
That would likely be the _easiest_ approach for the kernel, and does solve the problem with some apps knowingly removing the trailing '/'.
Note that we could try this out with existing filesystems with very minimal changes:
- make directory bind mounts work on top of files ("graft_tree()")
- make open_namei() and friend _not_ do the mount-point following for the last component if it's a non-directory.
- probably some trivial fixups I haven't thought about. There might be some places that use "S_ISDIR()" to check for whether something can be looked up, but the main path walking already just checks whether there is a ".lookup" operation or not.
This would already allow people to "try out" how different applications would react to a file that can show up both as a directory and a file. The patch might end up being less than 25 lines or so, the difficulty is in finding all the right places.
Al, anything I missed?
(And yes, it's a quick hack, but it's a quick hack that would probably mimic a good part of what we would have to do internally in the VFS layer to support this notion anyway).
Linus
[reposted in thread]
Quoted 11 lines · Linus Torvalds
Note that we could try this out with existing filesystems with very minimal changes:
- make directory bind mounts work on top of files ("
graft_tree()")
- makeopen_namei()and friend _not_ do the mount-point following for the last component if it's a non-directory.
- probably some trivial fixups I haven't thought about. There might be some places that use "S_ISDIR()" to check for whether something can be looked up, but the main path walking already just checks whether there is a ".lookup" operation or not.
Quoted 4 lines
This would already allow people to "try out" how different applications would react to a file that can show up both as a directory and a file. The patch might end up being less than 25 lines or so, the difficulty is in finding all the right places.
The real issue is what to do with unlink() et.al. on these guys. Note that "unlink is OK if all we have there is a bunch of directory mounts" won't work well - we have no good way to check that condition.
Even funnier one is what we do if we have directory mounted there *and* have something mounted on stuff in that directory.
Yes, that's one of the probable directions for such stuff, but there's a lot of fun semantics questions and answers to them will matter a lot.
Hey, if we lose the "can't unlink/rmdir/rename over something that is a mountpoint in other life" - I'm happy and we can get a lot of much more interesting stuff to work. It will take some work (e.g. making sure we can find all vfsmounts over given mountpoint and sorting out the locking issues, which won't be trivial), but the main obstacle in that direction is not in architecture - it's in SuS and tradition; as the matter of fact, our life would be much easier if we stopped trying to give -EBUSY here and just dissolved all subtrees mounted on anything that has that dentry.
Quoted 9 lines · On Thu, Aug 26, 2004 at 08:13:23PM +0100…
Hey, if we lose the "can't unlink/rmdir/rename over something that is a mountpoint in other life" - I'm happy and we can get a lot of much more interesting stuff to work. It will take some work (e.g. making sure we can find all vfsmounts over given mountpoint and sorting out the locking issues, which won't be trivial), but the main obstacle in that direction is not in architecture - it's in SuS and tradition; as the matter of fact, our life would be much easier if we stopped trying to give
-EBUSYhere and just dissolved all subtrees mounted on anything that has that dentry.
Argh... OK, now I remember why I went for -EBUSY for unlink() (we obviously are not bound by SuS on that one). Consider the following scenario:
* local file foo got something else bound on it for a while
* we are tight on space - time to clean up
* oh, look - contents of foo is junk
* rm foo
* ... oh, fuck, there goes the underlying file.
Am Donnerstag, den 26.08.2004, 21:32 +0100 schrieb :
Quoted 7 lines
Argh... OK, now I remember why I went for
-EBUSYforunlink()(we obviously are not bound by SuS on that one). Consider the following scenario:
* local file foo got something else bound on it for a while
* we are tight on space - time to clean up
* oh, look - contents of foo is junk
* rm foo
* ... oh, fuck, there goes the underlying file.
Right. Good thinking. You can't delete a directory while there regular files in it either.
Another question: /mnt/test is a mountpoint. Why can I rename mnt' but can't rename test'?
Quoted 8 lines · On Thu, 26 Aug 2004 [email protected] wrote:
Argh... OK, now I remember why I went for
-EBUSYforunlink()(we obviously are not bound by SuS on that one). Consider the following scenario:
* local file foo got something else bound on it for a while
* we are tight on space - time to clean up
* oh, look - contents of foo is junk
* rm foo
* ... oh, fuck, there goes the underlying file.
Hey, that's a valid reason for doing -EBUSY for normal bind-mounts, but it actually _is_ what we want for an "implied-by-way-of-container-mount". After all, when you do a "rm foo", you do mean "remove the container foo".
I replied to your earlier off-list mail in private, so let's re-iterate for the list: the easiest way to handle this is to just have a "mount option", and have "MNT_ALLOWUNLINK" that gets set for containers, and that users could possibly choose to set for regular mounts too (as a mount option) if they really want to (and if we want them to).
So there's no reason we'd have to drop existing mount behaviour only because we also have special files that look like mountpoints.
Linus
[some sanity for a change] possible design issues for hybrids
[subject changed and *please* let's keep the wankfest out of that branch; we are talking about possible ways to handle hybrids, *NOT* their desirability, effect on DARPA funding, size of KDE developers' genitals experienced by Aunt Tillie, etc.]
Quoted 4 lines · Linus Torvalds
Hey, that's a valid reason for doing
-EBUSYfor normal bind-mounts, but it actually _is_ what we want for an "implied-by-way-of-container-mount". After all, when you do a "rm foo", you do mean "remove the container foo".
Quoted 8 lines
I replied to your earlier off-list mail in private, so let's re-iterate for the list: the easiest way to handle this is to just have a "mount option", and have "
MNT_ALLOWUNLINK" that gets set for containers, and that users could possibly choose to set for regular mounts too (as a mount option) if they really want to (and if we want them to).So there's no reason we'd have to drop existing mount behaviour only because we also have special files that look like mountpoints.
All right, let's see where that would take us.
1) we would need to find all vfsmounts over given dentry. Probably a cyclic list (we want to check if there are normal mounts/bindings among those and we want to dissolve them if there's none).
2) we would need to do something about locking, since mount trees in other guys' namespaces are protected by semaphores of their own.
3) what do we do on umount(2)? We can get a bunch of vfsmounts hanging off it. MNT_DETACH will have no problems, but normal umount() is a different story. Note that it's not just hybrid-related problem - implementing the mount traps will cause the same kind of trouble,
4) OK, we have those hybrids and want to create vfsmounts when crossing a mountpoint. When do they go away, anyway? When we don't reference them anymore? Right now "attached to mount tree" == "+1 to refcount" and detaching happens explicitly - outside of the "dropping the final reference" path. Might become a locking issue.
5) Creation of these vfsmounts: fs should somehow tell us whether it wants one or not (at the very least, we should stop *somewhere*). Can we use the same dentry/inode? I'm not sure and I really doubt that we'd like that.
6) if it's a method, where should it live, *especially* if we want them on device nodes. Note that inode_operations belongs to underlying fs, so it's not particulary good place for device case.
7) automount folks want partially shared mount trees (well, mirrored, actually). The basic idea is that while namespace boundary is a trust boundary, we might want to be able to say "I trust this guy to handle that subtree under /home/stuff/foobar/mounts". It's the same situation as with shared mappings (I want separate address space, but I'm willing to share that chunk of memory with other process), except that we want it to be allowed to become asymmetric (shared r/o mapping with somebody
else having it r/w). That stuff (and mount traps) is the next pending
major work on the mount trees. We probably want hybrids work to go with it, since they affect the same data structures and need more or less the same changes.
[And yes, this is the open season on design discussions for shared subtrees - automount folks are welcome to join]
8) what should happen when something is mounted on top of directory-over-file? How do we treat such beasts? What are the implications?
9) how do we recognize such mountpoints in the path lookups? It *is* a hot path, so we should be careful in that area; the impact will be felt by everything in the system.
10) how do we deal with directories, anyway? Mixing "attributes" with normal directory contents is going to be fun, what with lseek() insanity. That's not an issue for hybrids, but it is one for anybody who wants any sort of common metadata exported that way. Note that it's really important for fs writers - having two different pieces of code to export the same information (for directories and non-directories resp.) is going to become a prime breeding ground for bugs.
11) if we go for your "here's stuff that belongs in device node viewed as directory", how would that play with fs metadata exporters? Again, due to the insanity of lseek() on directories it's *very* hard to deal with unions, when parts of directory come from different chunks of code.
That's it for starters. Technical answers/questions/comments are welcome. Generic masturbation => over there in the parent thread, please.
Re: [some sanity for a change] possible design issues for hybrids
[ This is quite possibly just impossible and buggy, but here's my
implementation notes. You asked for them. ]
Quoted 6 lines · On Thu, 26 Aug 2004 [email protected] wrote:
All right, let's see where that would take us.
1) we would need to find all vfsmounts over given dentry. Probably a cyclic list (we want to check if there are normal mounts/bindings among those and we want to dissolve them if there's none).
Not per-inode? dentries are a bitmore memory-constrained than inodes, and we only need this for filesystems that want to support it, so we wouldn't need to put this information in each dentry.
Since the vfsmounts have back-pointers to the dentry they are mounted on, you can still do a "per-dentry" traversal, by just doign the inode list and checking the dentry pointer. No?
Alternatively, we could just put the list on an external hash-chain entirely, and hash off the dentry. It depends on how often we end up needing it.
Or we could just put it in the dentry itself. I'd hate to make it any bigger than it already is, but maybe it doesn't matter that much.
Quoted 2 lines
2) we would need to do something about locking, since mount trees in other guys' namespaces are protected by semaphores of their own.
Ok, I'll admit that I don't know how to handle namespaces. These things should just go into a global namespace, and I was kind of assuming it would happen automatically in "lookup_mnt()" or something like that. A special case in lookup_mnt which says something like "if you didn't find a vfsmount, we create a new one for you".
It should be reasonably easy to create new ones on-the-fly, since we'd have all the information (the parent vfsmount comes stated, and the vfsmount we create would point to the same things that the "base" one would).
Quoted 4 lines
3) what do we do on umount(2)? We can get a bunch of vfsmounts hanging off it.
MNT_DETACHwill have no problems, but normalumount()is a different story. Note that it's not just hybrid-related problem - implementing the mount traps will cause the same kind of trouble,
Don't allow umount. It's not something the user can unmount - the mount is "implied" in the file.
Quoted 5 lines
4) OK, we have those hybrids and want to create vfsmounts when crossing a mountpoint. When do they go away, anyway? When we don't reference them anymore? Right now "attached to mount tree" == "+1 to refcount" and detaching happens explicitly - outside of the "dropping the final reference" path. Might become a locking issue.
Ahh. Umm.. Yes. I think this might be the real problem. Unless I seriously clossed something over when I blathered about the "create the vfsmount on the fly" thing above ;)
Quoted 3 lines
5) Creation of these vfsmounts: fs should somehow tell us whether it wants one or not (at the very least, we should stop *somewhere*). Can we use the same dentry/inode? I'm not sure and I really doubt that we'd like that.
Why not? When doing the ->lookup() operation, the filesystem would create the vfsmount and bind it to the current vfsmount. That guarantees that it has a vfsmount, and will mean that it will show up positive with the "d_mountpoint()" query, which in turn will cause us to do the "lookup_mnt()".
Which in turn will create the other vfsmounts as needed, if you have multiple namespaces.
So I _think_ creation is easy. Getting rid of the dang things migth be harder.
Quoted 3 lines
6) if it's a method, where should it live, *especially* if we want them on device nodes. Note that
inode_operationsbelongs to underlying fs, so it's not particulary good place for device case.
Why not just let the existing .lookup method initialize the mount-point thing? After that, it's all in the VFS layer (I'd hate to have filesystems mess around with vfsmounts - they'll just get it wrong).
Quoted 2 lines
7) automount folks want partially shared mount trees (well, mirrored, actually).
I don't think you can get partial sharing on one of these puppies. You'd always have one vfsmount per namespace (well, lazily created, so maybe in practice you'd see a lot fewer).
Quoted 2 lines
8) what should happen when something is mounted on top of directory-over-file? How do we treat such beasts? What are the implications?
Allow file-on-file mounts - it will just totally hide the thing (in that namespace, at least). But don't allow the dir-on-file thing (that we already don't allow).
Quoted 3 lines
9) how do we recognize such mountpoints in the path lookups? It *is* a hot path, so we should be careful in that area; the impact will be felt by everything in the system.
I don't think you'll have any special cases. Same d_mountpount(), same lookup_mnt().
Quoted 2 lines
10) how do we deal with directories, anyway? Mixing "attributes" with normal directory contents is going to be fun, what with
lseek()insanity.
You couldn't get at the attributes that way anyway, so I think the point is moot. The "real" directory always takes over.
Crazy people could try to just use the regular "xattrs" interfaces if they really want attributes on directories. You wouldn't ever be able to use the "easy" one.
Quoted 4 lines
11) if we go for your "here's stuff that belongs in device node viewed as directory", how would that play with fs metadata exporters? Again, due to the insanity of
lseek()on directories it's *very* hard to deal with unions, when parts of directory come from different chunks of code.
Don't go there. See above. Directories would be just plain directories, you could never see their metadata. Same goes for at least symlinks, and possibly other filetypes too (ie at least initially, a block or character special device will just take over the whole "file_operations", which includes "readdir", so it's actually hard to have the filesystem do anything about those).
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 9 lines · Linus Torvalds
Quoted 2 lines
2) we would need to do something about locking, since mount trees in other guys' namespaces are protected by semaphores of their own.
Ok, I'll admit that I don't know how to handle namespaces. These things should just go into a global namespace, and I was kind of assuming it would happen automatically in "
lookup_mnt()" or something like that. A special case inlookup_mntwhich says something like "if you didn't find a vfsmount, we create a new one for you".
Quoted 4 lines
It should be reasonably easy to create new ones on-the-fly, since we'd have all the information (the parent vfsmount comes stated, and the vfsmount we create would point to the same things that the "base" one would).
Erm... What do we do upon unlink()? I'm killing a file, fs it's in is mounted in a dozen of places (no namespaces, just chroot jails, whatever). We need to find all vfsmounts to be killed by that.
And BTW that's an argument against anchoring that list in inode - unlink() on foo should not screw bar/... even if bar and foo are links to the same file. So we'll need to check for dentry match anyway.
Quoted 7 lines
Quoted 4 lines
3) what do we do on umount(2)? We can get a bunch of vfsmounts hanging off it.
MNT_DETACHwill have no problems, but normalumount()is a different story. Note that it's not just hybrid-related problem - implementing the mount traps will cause the same kind of trouble,Don't allow umount. It's not something the user can unmount - the mount is "implied" in the file.
See below.
Quoted 14 lines
Quoted 5 lines
4) OK, we have those hybrids and want to create vfsmounts when crossing a mountpoint. When do they go away, anyway? When we don't reference them anymore? Right now "attached to mount tree" == "+1 to refcount" and detaching happens explicitly - outside of the "dropping the final reference" path. Might become a locking issue.
Ahh. Umm.. Yes. I think this might be the real problem. Unless I seriously clossed something over when I blathered about the "create the vfsmount on the fly" thing above ;)
Quoted 3 lines
5) Creation of these vfsmounts: fs should somehow tell us whether it wants one or not (at the very least, we should stop *somewhere*). Can we use the same dentry/inode? I'm not sure and I really doubt that we'd like that.
Quoted 5 lines
Why not? When doing the ->lookup() operation, the filesystem would create the vfsmount and bind it to the current vfsmount. That guarantees that it has a vfsmount, and will mean that it will show up positive with the "
d_mountpoint()" query, which in turn will cause us to do the "lookup_mnt()".
Several paragraphs below you are saying that you don't like fs messing with vfsmounts. Use of ->lookup() would mean that we should not only create and attach vfsmounts from within fs code, but would actually have to make ->lookup() return vfsmount+dentry, AFAICS.
Quoted 11 lines
Quoted 3 lines
6) if it's a method, where should it live, *especially* if we want them on device nodes. Note that
inode_operationsbelongs to underlying fs, so it's not particulary good place for device case.Why not just let the existing .lookup method initialize the mount-point thing? After that, it's all in the VFS layer (I'd hate to have filesystems mess around with vfsmounts - they'll just get it wrong).
Allow file-on-file mounts - it will just totally hide the thing (in that namespace, at least). But don't allow the dir-on-file thing (that we already don't allow).
Err... What about dir-on-dir-that-is-on-file? I.e. mount on foo/. when foo is a file?
Quoted 6 lines
Quoted 3 lines
9) how do we recognize such mountpoints in the path lookups? It *is* a hot path, so we should be careful in that area; the impact will be felt by everything in the system.
I don't think you'll have any special cases. Same
d_mountpount(), samelookup_mnt().
See above on use ->lookup()
Re: [some sanity for a change] possible design issues for hybrids
Quoted 9 lines · On Thu, 26 Aug 2004 [email protected] wrote:
Quoted 5 lines
It should be reasonably easy to create new ones on-the-fly, since we'd have all the information (the parent vfsmount comes stated, and the vfsmount we create would point to the same things that the "base" one would).
Erm... What do we do upon
unlink()? I'm killing a file, fs it's in is mounted in a dozen of places (no namespaces, just chroot jails, whatever). We need to find all vfsmounts to be killed by that.
But that should be trivial: that's what the per-inode vfsmount list was (your first question in the last email).
Quoted 3 lines
And BTW that's an argument against anchoring that list in inode -
unlink()on foo should not screw bar/... even if bar and foo are links to the same file. So we'll need to check for dentry match anyway.
And again - I talked about this in the previous email. Even if you anchor the list in "struct inode", or you do it with a totally external hash-list, you'll always have the "vfsmount->mnt_mountpoint" pointer to point to the dentry. So you can just iterate over the list, and cherry-pick the ones that point to the dentry you are removing.
Quoted 31 lines
Quoted 8 lines
Quoted 5 lines
3) what do we do on umount(2)? We can get a bunch of vfsmounts hanging off it.
MNT_DETACHwill have no problems, but normalumount()is a different story. Note that it's not just hybrid-related problem - implementing the mount traps will cause the same kind of trouble,Don't allow umount. It's not something the user can unmount - the mount is "implied" in the file.
See below.
Quoted 14 lines
Quoted 5 lines
4) OK, we have those hybrids and want to create vfsmounts when crossing a mountpoint. When do they go away, anyway? When we don't reference them anymore? Right now "attached to mount tree" == "+1 to refcount" and detaching happens explicitly - outside of the "dropping the final reference" path. Might become a locking issue.
Ahh. Umm.. Yes. I think this might be the real problem. Unless I seriously clossed something over when I blathered about the "create the vfsmount on the fly" thing above ;)
Quoted 3 lines
5) Creation of these vfsmounts: fs should somehow tell us whether it wants one or not (at the very least, we should stop *somewhere*). Can we use the same dentry/inode? I'm not sure and I really doubt that we'd like that.
Quoted 5 lines
Why not? When doing the ->lookup() operation, the filesystem would create the vfsmount and bind it to the current vfsmount. That guarantees that it has a vfsmount, and will mean that it will show up positive with the "
d_mountpoint()" query, which in turn will cause us to do the "lookup_mnt()".
Quoted 4 lines
Several paragraphs below you are saying that you don't like fs messing with vfsmounts. Use of ->lookup() would mean that we should not only create and attach vfsmounts from within fs code, but would actually have to make ->lookup() return vfsmount+dentry, AFAICS.
No, lookup would just return the dentry, but the dentry would already be filled in with the mount-point information.
And you can do that with a simple vfs helper function, ie the filesystem itself would just need to do
pseudo_mount(dentry, inode);
thing - which just fills in dentry->d_mountpoint with a new vfsmount thing. It would allocate a new root dentry (for the pseudo-mount) and a new vfsmount, and make dentry->d_mountpoint point to it.
IOW, the filesystem itself would never mess around with d_mountpoint itself.
Quoted 2 lines
Err... What about dir-on-dir-that-is-on-file? I.e. mount on foo/. when foo is a file?
Hmm.. We might as well allow it, I suspect. It's not like it should hurt. We'd end up following the mount-chain twice, but we already have that issue with multi-mount cases..
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 11 lines · Linus Torvalds
No, lookup would just return the dentry, but the dentry would already be filled in with the mount-point information.
And you can do that with a simple vfs helper function, ie the filesystem itself would just need to do
pseudo_mount(dentry, inode);thing - which just fills in
dentry->d_mountpointwith a new vfsmount thing. It would allocate a new root dentry (for the pseudo-mount) and a new vfsmount, and makedentry->d_mountpointpoint to it.
What dentry->d_mountpoint? No such thing...
Note that we can't get vfsmount by dentry - that's the point of having these guys in the first place. So I'm not sure what you are trying to do here - dentry + inode is definitely not enough to attach any vfsmounts anywhere.
That's not about namespaces - same fs mounted in several places will give the same problem - one dentry, many vfsmounts. And we obviously *can't* have one vfsmount for all of them - if the same fs is mounted on /foo and /bar, we will have the same dentry for /foo/splat and /bar/splat. So what should we get for /foo/splat/. and /bar/splat/.? Same dentry *and* same vfsmount? I'd expect .. from the former to give /foo and from the latter - /bar...
Re: [some sanity for a change] possible design issues for hybrids
Quoted 2 lines · On Thu, 26 Aug 2004 [email protected] wrote:
What
dentry->d_mountpoint? No such thing...
Sorry - set "dentry->d_mounted++" + "add vfsmount/dentry to hashes".
Yes, it's not a direct list off the dentry, but it effectively is the same thing.
So basically: the "d_mounted++" just makes sure we get into "lookup_mnt()". That's where we will usually find the actual mount thing.
And that's also where the special case comes in: if we _don't_ find the mount thing there, that's where we need to create it. That will only happen if somebody looks it up using another namespace, though, so it should be rare.
And when it does happen, we can just create a new vfsmount - we have all the information there (we'll have to walk the per-inode-or-whatever vfsmount list to find all the information to populate the thing with, of course. But we need that list _anyway_, so it should be a fairly straightforward special case).
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 7 lines · Linus Torvalds
So basically: the "d_mounted++" just makes sure we get into "
lookup_mnt()". That's where we will usually find the actual mount thing.And that's also where the special case comes in: if we _don't_ find the mount thing there, that's where we need to create it. That will only happen if somebody looks it up using another namespace, though, so it should be rare.
No. Trivial example:
mount --bind /foo /bar
mount /dev/sda1 /bar/baz
do lookup for /foo/baz. No namespaces involved, no vfsmounts found, d_mounted positive and we certainly do *not* want anything to be created at that point.
Re: [some sanity for a change] possible design issues for hybrids
Quoted 9 lines · On Fri, 27 Aug 2004 [email protected] wrote:
Quoted 7 lines · Linus Torvalds
So basically: the "d_mounted++" just makes sure we get into "
lookup_mnt()". That's where we will usually find the actual mount thing.And that's also where the special case comes in: if we _don't_ find the mount thing there, that's where we need to create it. That will only happen if somebody looks it up using another namespace, though, so it should be rare.
Quoted 7 lines
No. Trivial example:
mount --bind /foo /bar
mount/dev/sda1/bar/bazdo lookup for /foo/baz. No namespaces involved, no vfsmounts found,
d_mountedpositive and we certainly do *not* want anything to be created at that point.
Right. We obviously need to mark the dentry somehow, and only do the "create vfsmount" special case in this special case. If we didn't do that, then it wouldn't be a special case, now would it?
So clearly lookup_mnt() needs to check the dentry in the failure case. The marking could be in any of three places
- mark the dentry itself by just using a dentry flag ("DCACHE_AUTOVFSMNT") or by having a dentry operation for this.
- mark the inode itself (same logic as dentry)
- look up the first vfsmount (on the inode list), and look if that one is of the automatic type.
Clearly we should not _always_ create a vfsmount, that would just break the existign logic.
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 12 lines · Linus Torvalds
Right. We obviously need to mark the dentry somehow, and only do the "create vfsmount" special case in this special case. If we didn't do that, then it wouldn't be a special case, now would it?
So clearly
lookup_mnt()needs to check the dentry in the failure case. The marking could be in any of three places
- mark the dentry itself by just using a dentry flag ("DCACHE_AUTOVFSMNT") or by having a dentry operation for this.
- mark the inode itself (same logic as dentry)
- look up the first vfsmount (on the inode list), and look if that one is of the automatic type.
Quoted 2 lines
Clearly we should not _always_ create a vfsmount, that would just break the existign logic.
Hmm... IOW, you are suggesting to use normal trigger for lookup_mnt() and then have extra check in lookup_mnt() failure exit. That will probably work (and I'd prefer to mark dentry here).
Freeing these guys will not be fun. The final reference could be given up under very different locking conditions - it's certainly a blocking operation (it can trigger final umount, among other things), but having it trigger removal from mount tree(s) can get ugly. We might be able to tweak that, but it will probably need require major surgery in several places.
Right now we assume that vfsmount lock *and* per-namespace semaphore are held when detaching from the tree (attaching what could be the first at given dentry --- same + i_sem on its ->i_sem). We also assume that vfsmount is detached before refcount reaches zero. The thing is, that final refcount can be dropped while holding namespace semaphore. It's not fatal (we'll need to hold onto these guys until dropping that semaphore or add an analog of mntput() for places under namespace sem), but it can get messy.
Situation with unlink(): we need to (a) check that all vfsmounts over given point are "hybrid" ones (locking is not a problem at that point) and (b) after successful operation (unlink() and rename() alike, AFAICS) we want to go and kill everything under the victim dentry. *That* can get very ugly, since fs could be mounted in a lot of places and/or in a lot of namespaces.
Note that we also need to do in VFS what NFS tries to do in revalidation - if dentry is invalidated, everything under it should be detached and dropped. So it's not something new - we do need something that would be called outside of any superblock/namespace/vfsmount locks (both unlink() and revalidation qualify) and would kill the vfsmounts that become unreachable.
Locking rules for attaching might need adjustment (the logics with ->i_sem is that we want !d_mountpoint() stay true around call of ->unlink(), ->rmdir() and ->rename(); so cloning or replacing doesn't need that protection. Now it might become interesting - we'll need to be careful in pivot_root(2) and possibly some other places).
I'll see what can be done (it'll definitely take careful looking at the code), but there is a chance of things getting very ugly.
BTW, shared subtrees *are* compatible with that puppy - there's a lot of corner cases to look at, but AFAICS they are all doable. Lifetime rules can get ugly in some of them, but that's on par with the situation without sharing.
One thing that looks like a bad interface: we get forcible "use same dentry for file and directory" with that design. That can lead to a big can of worms - without a large audit I wouldn't bet a dime on ability to get that right (and same applies to reiser4 code as-is, for the same reasons). No idea how bad it will turn out to be - right now all I can say is that we might run into trouble and that we almost certainly will get extra "be careful not to do <list of things>" rules out of that.
Re: [some sanity for a change] possible design issues for hybrids
Quoted 3 lines · On Fri, 27 Aug 2004 [email protected] wrote:
Hmm... IOW, you are suggesting to use normal trigger for
lookup_mnt()and then have extra check inlookup_mnt()failure exit.
Yes. That should be an _extremely_ rare failure case anyway, unless people start using namespaces more.
Quoted 1 line
Freeing these guys will not be fun.
I agree. I frankly have no idea how to do it. I think we need to keep them around for as long as the dentry lifetime, I suspect. That would likely imply that the vfsmount can't increase the dentry refcount - and we'd have some special code in dentry_iput() or something to get rid of them.
Quoted 6 lines
Situation with
unlink(): we need to (a) check that all vfsmounts over given point are "hybrid" ones (locking is not a problem at that point) and (b) after successful operation (unlink()andrename()alike, AFAICS) we want to go and kill everything under the victim dentry. *That* can get very ugly, since fs could be mounted in a lot of places and/or in a lot of namespaces.
It _might_ be acceptable to just do the normal shrink_dentry thing, and then return EBUSY if somebody is still there.
Quoted 3 lines
Locking rules for attaching might need adjustment (the logics with ->i_sem is that we want !d_mountpoint() stay true around call of ->unlink(), ->rmdir() and ->rename()
That should be ok. Since we'd only do the d_mount stuff on a "->lookup()", and since the lookup will take ->i_sem anyway, we should be fine, no?
Quoted 2 lines
One thing that looks like a bad interface: we get forcible "use same dentry for file and directory" with that design.
Hmm.. Wouldn't the "directory" dentry always be the fake-mountpoint root one? So we'd always have two dentries, although they are tied together pretty tightly..
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · On Fri, 27 Aug 2004 [email protected] wrote:
Hmm... IOW, you are suggesting to use normal trigger for
lookup_mnt()and then have extra check inlookup_mnt()failure exit.Yes. That should be an _extremely_ rare failure case anyway, unless people start using namespaces more.
Namespaces actually are irrelevant - a box with several dozens of chroot jail is not particulary exotic thing and it's equivalent to our case.
However, extra check of a flag at that point won't be too much overhead anyway.
Quoted 6 lines
Quoted 1 line
Freeing these guys will not be fun.
I agree. I frankly have no idea how to do it. I think we need to keep them around for as long as the dentry lifetime, I suspect. That would likely imply that the vfsmount can't increase the dentry refcount - and we'd have some special code in
dentry_iput()or something to get rid of them.
My plan is to drop them as soon as their refcount goes to zero. In other words, make the final mntput() do removal from tree for such vfsmounts. Will take some surgery, but it's definitely safer than playing with ->d_iput() et.al.
Quoted 5 lines
Quoted 2 lines
can get very ugly, since fs could be mounted in a lot of places and/or in a lot of namespaces.
It _might_ be acceptable to just do the normal
shrink_dentrything, and then return EBUSY if somebody is still there.
We need it for graceful invalidation in case of NFS and friends, though. I think it might be doable; if it isn't, we'll see what else can be done, but it's worth investigating.
Quoted 6 lines
Quoted 3 lines
Locking rules for attaching might need adjustment (the logics with ->i_sem is that we want !d_mountpoint() stay true around call of ->unlink(), ->rmdir() and ->rename()
That should be ok. Since we'd only do the
d_mountstuff on a "->lookup()", and since the lookup will take ->i_sem anyway, we should be fine, no?
Oh, I'm not worried about that kind of incrementing ->d_mount. It's OK. It's existing places that worry me - e.g. if we get pivot_root() moving that hybrid-created vfsmount around and suddenly find that we had replaced "killable" vfsmount with normal one, while holding only vfsmount lock. That would screw the logics in unlink() if we get a race.
It's not that hard to do, just that we need to take a good look at that kind of corner cases.
Quoted 6 lines
Quoted 2 lines
One thing that looks like a bad interface: we get forcible "use same dentry for file and directory" with that design.
Hmm.. Wouldn't the "directory" dentry always be the fake-mountpoint root one? So we'd always have two dentries, although they are tied together pretty tightly..
No. We don't want to allocate dentries outside of fs code - if nothing else, they may need to have proper ->d_op set, etc. So the only way I see here is to have lookup_mnt() set the dentry it got to ->mnt_root of new vfsmount. Anything else opens such a can of worms that I don't want to think of audit involved.
We *might* have a secondary dentry allocated by ->lookup() and stored somewhere in the main one. I'm not sure it's a good way to handle the things, though.
I'll try to put together what we got so far + notes on mount-traps and post more coherent and detailed variant of original post. Hopefully, writing it down would help to sort the things out...
Re: [some sanity for a change] possible design issues for hybrids
Quoted 8 lines · On Fri, 27 Aug 2004 [email protected] wrote:
Quoted 5 lines
I agree. I frankly have no idea how to do it. I think we need to keep them around for as long as the dentry lifetime, I suspect. That would likely imply that the vfsmount can't increase the dentry refcount - and we'd have some special code in
dentry_iput()or something to get rid of them.My plan is to drop them as soon as their refcount goes to zero. In other words, make the final
mntput()do removal from tree for such vfsmounts.
Can't do that. At least not if you do my plan.
Even with a zero refcount, the dentry is still valid, and won't see a new "->lookup()". And since in my scheme the vfsmount is populated only at lookup (and copied later), you can't drop _all_ the vfsmount's. You'd have to at least leave one of them, in order to know how to re-create the others.
Or do you have a cunning plan?
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
can get very ugly, since fs could be mounted in a lot of places and/or in a lot of namespaces.
It _might_ be acceptable to just do the normal
shrink_dentrything, and then return EBUSY if somebody is still there.We need it for graceful invalidation in case of NFS and friends, though. I think it might be doable; if it isn't, we'll see what else can be done, but it's worth investigating.
Hey, succeeding and leaving it pending is obviously the user-friendly thing to do, so I won't argue against it. It's more of a "if it's too hard to do right, EBUSY is probably an acceptable fallback".
Quoted 9 lines
Quoted 3 lines
Hmm.. Wouldn't the "directory" dentry always be the fake-mountpoint root one? So we'd always have two dentries, although they are tied together pretty tightly..
No. We don't want to allocate dentries outside of fs code - if nothing else, they may need to have proper ->d_op set, etc. So the only way I see here is to have
lookup_mnt()set the dentry it got to ->mnt_root of new vfsmount. Anything else opens such a can of worms that I don't want to think of audit involved.
Hmm. If you use the same dentry for mnt_root as for mnt_mountpoint, how do you avoid the infinite loop in follow_mount? Another magic special case?
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 9 lines · Linus Torvalds
Can't do that. At least not if you do my plan.
Even with a zero refcount, the dentry is still valid, and won't see a new "->lookup()". And since in my scheme the vfsmount is populated only at lookup (and copied later), you can't drop _all_ the vfsmount's. You'd have to at least leave one of them, in order to know how to re-create the others.
Or do you have a cunning plan?
a) set ->d_mount to 1 and set DCACHE_HYBRID at ->lookup() time
b) in lookup_mnt():
if (unlikely(dentry has DCACHE_HYBRID)) {
if (linkely(dentry->d_mount == 1))
goto New;
}
do the normal series of hash lookups
if (likely(dentry doesn't have DCACHE_HYBRID))
return;
if (vfsmount is marked as hybrid && dentry == vfsmount->mnt_dentry)
return;New:
allocate new vfsmount and mark it as hybrid attach it on top of our one and go there
Does that qualify as cunning? With that approach we have nothing non-trivial to do at lookup time and lookup_mnt() will DTRT with minimal fuss.
Quoted 2 lines
Hmm. If you use the same dentry for
mnt_rootas formnt_mountpoint, how do you avoid the infinite loop infollow_mount? Another magic special case?
See above. And yes, I'd love to get a separate dentry (and inode, while we are at it). But I don't see how to do that.
One note: we might split lookup_mnt() in two functions - one for the middle of lookup, another for final (non-triggering) step.
Re: [some sanity for a change] possible design issues for hybrids
Quoted 5 lines · On Fri, 27 Aug 2004 [email protected] wrote:
Quoted 2 lines
Or do you have a cunning plan?
a) set ->d_mount to 1 and set
DCACHE_HYBRIDat ->lookup() time
b) inlookup_mnt():
Quoted 9 lines
if (unlikely(dentry has DCACHE_HYBRID)) {
if (linkely(dentry->d_mount == 1))
goto New;
}
do the normal series of hash lookups
if (likely(dentry doesn't have DCACHE_HYBRID))
return;
if (vfsmount is marked as hybrid && dentry == vfsmount->mnt_dentry)
return;Hmm.. Here we shouldn't have a vfsmount. If we have one, that means that we found it in the hashes, and we should just have returned it immediately (whether hybrid or not doesn't matter at that point).
Also, I don't see the magic with "dentry->d_mount == 1", since we may have allowed the dentry to be mounted on for real at one of the places, without losing it's "hydridity" (it's not a word, but dammit, it should be one) for that.
Is that part just an optimization to avoid the hash lookups?
Quoted 6 lines
New:
allocate new vfsmount and mark it as hybrid attach it on top of our one and go thereDoes that qualify as cunning? With that approach we have nothing non-trivial to do at lookup time and
lookup_mnt()will DTRT with minimal fuss.
Ok, I think it qualifies as cunning enough. It has the nice property of not apparently needing any vfsmount-related code at all at lookup() time. Which is a bonus.
Quoted 8 lines
Quoted 2 lines
Hmm. If you use the same dentry for
mnt_rootas formnt_mountpoint, how do you avoid the infinite loop infollow_mount? Another magic special case?See above. And yes, I'd love to get a separate dentry (and inode, while we are at it). But I don't see how to do that.
One note: we might split
lookup_mnt()in two functions - one for the middle of lookup, another for final (non-triggering) step.
Yes. We don't necessarily even want to trigger the special mountpoint case at all if we don't need it - which normal usage probably wouldn't ever trigger. So I agree 100% - that way I think you actually allocate the vfsmount until somebody really starts doing the "new things". Was that your plan?
Linus
Re: [some sanity for a change] possible design issues for hybrids
Quoted 7 lines · Linus Torvalds
Quoted 3 lines
if (vfsmount is marked as hybrid && dentry == vfsmount->mnt_dentry) return;Hmm.. Here we shouldn't have a vfsmount. If we have one, that means that we found it in the hashes, and we should just have returned it immediately (whether hybrid or not doesn't matter at that point).
Ahh, I misunderstood you.
You mean that if the _old_ vfsmount was already a hybrid one, we won't try to recurse if we didn't find any other, so we return NULL at that point.
Got it. Yes, I bow before your cunningness.
Linus
Re: [some sanity for a change] possible design issues for hybrids
In reply to Linus TorvaldsQuoted 18 lines · Linus Torvalds
[ This is quite possibly just impossible and buggy, but here's my
implementation notes. You asked for them. ]Quoted 5 lines · On Thu, 26 Aug 2004 [email protected] wrote:
All right, let's see where that would take us.
3) what do we do on umount(2)? We can get a bunch of vfsmounts hanging off it.MNT_DETACHwill have no problems, but normalumount()is a different story. Note that it's not just hybrid-related problem - implementing the mount traps will cause the same kind of trouble,Don't allow umount. It's not something the user can unmount - the mount is "implied" in the file.
Quoted 5 lines
4) OK, we have those hybrids and want to create vfsmounts when crossing a mountpoint. When do they go away, anyway? When we don't reference them anymore? Right now "attached to mount tree" == "+1 to refcount" and detaching happens explicitly - outside of the "dropping the final reference" path. Might become a locking issue.
Quoted 3 lines
Ahh. Umm.. Yes. I think this might be the real problem. Unless I seriously clossed something over when I blathered about the "create the vfsmount on the fly" thing above ;)
If it is created on the fly, it should be "easy" to destroy on the fly using time-based expiry, i.e. a kernel daemon going over all of those beasts every X seconds (X = 5 perhaps?) and doing something like:
for (each vfsmount) {
lock_vfsmount(vfsmount);
if (MOUNT_IS_BUSY(vfsmount)) {
unlock_vfsmount(vfsmount);
continue;
}
if (current_time() < (vfsmount->last_used_time +
vfsmount->expire_after)) {
unlock_vfsmount(vfsmount);
continue;
}
destroy_locked_vfsmount(vfsmount);
}Wouldn't that work?
Quoted 9 lines
Quoted 2 lines
10) how do we deal with directories, anyway? Mixing "attributes" with normal directory contents is going to be fun, what with
lseek()insanity.You couldn't get at the attributes that way anyway, so I think the point is moot. The "real" directory always takes over.
Crazy people could try to just use the regular "xattrs" interfaces if they really want attributes on directories. You wouldn't ever be able to use the "easy" one.
But that defeats the whole point of the hybrid objects! We might as well just keep the xattrs interface and throw away the new one if we will have to keep the old one anyway so that we can do named streams/attributes on directories. Windows (and other OS?) certainly do allow them and do use them on directories as well as files...
Quoted 11 lines
Quoted 4 lines
11) if we go for your "here's stuff that belongs in device node viewed as directory", how would that play with fs metadata exporters? Again, due to the insanity of
lseek()on directories it's *very* hard to deal with unions, when parts of directory come from different chunks of code.Don't go there. See above. Directories would be just plain directories, you could never see their metadata. Same goes for at least symlinks, and possibly other filetypes too (ie at least initially, a block or character special device will just take over the whole "
file_operations", which includes "readdir", so it's actually hard to have the filesystem do anything about those).
Ah, but at least in other OS (Windows is the one I know about) directories _also_ have the same semantics as files with respect to named streams/attributes.
Best regards,
Anton
Signature · 4 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
Re: [some sanity for a change] possible design issues for hybrids
Quoted 18 lines · Anton Altaparmakov
If it is created on the fly, it should be "easy" to destroy on the fly using time-based expiry, i.e. a kernel daemon going over all of those beasts every X seconds (X = 5 perhaps?) and doing something like:
for (each vfsmount) { lock_vfsmount(vfsmount); if (MOUNT_IS_BUSY(vfsmount)) { unlock_vfsmount(vfsmount); continue; } if (current_time() < (vfsmount->last_used_time + vfsmount->expire_after)) { unlock_vfsmount(vfsmount); continue; } destroy_locked_vfsmount(vfsmount); }
Quoted 1 line
Wouldn't that work?
That would work for a low number of them. But with Hans' "visions" we'd have a damn lot of them at which point this isn't really scalable.
On Thu, Aug 26, 2004 at 09:28:41PM +0300, Denis Vlasenko wrote:
|
| Is it possible to sufficiently hide "dirs inside files"
| so that old tools will be unable to see them?
|
| I just checked:
|
| ls -d /foo does lstat64("/foo", ...)
| ls -d /foo/ does lstat64("/foo", ...)
| but
| ls -d /foo/. does lstat64("/foo/.", ...)
|
| Will it work out if "dir inside file" will only be visible when referred as "file/."?I'm used to using ls symlink/. to get ls to show me the directory on the far side of a symbolic link. That's a pretty analagous case to the one we're discussing here, I think?
Jon
Signature · 4 lines
------------------------------------------------------------------------------- Jonathan Abbey [email protected] Applied Research Laboratories The University of Texas at Austin GPG Key: 71767586 at keyserver pgp.mit.edu, http://www.ganymeta.org/workkey.gpg
Quoted 6 lines · Jonathan Abbey
| Will it work out if "dir inside file" will only be visible when referred as "file/."?
I'm used to using ls symlink/. to get ls to show me the directory on the far side of a symbolic link. That's a pretty analagous case to the one we're discussing here, I think?
By the way, do symlinks have metadata? Where do you find it? :)
-- Jamie
Am Donnerstag, den 26.08.2004, 21:16 +0100 schrieb Jamie Lokier:
Quoted 8 lines
Quoted 6 lines
| Will it work out if "dir inside file" will only be visible when referred as "file/."?
I'm used to using ls symlink/. to get ls to show me the directory on the far side of a symbolic link. That's a pretty analagous case to the one we're discussing here, I think?
By the way, do symlinks have metadata? Where do you find it? :)
Oops. :)
At least in reiser4 they don't have, or at least you can't access them. ln -s foo bar; cd bar/metas shows me the content of foo/metas.
symlinks are special anyway. Their rights are 777. The only thing they can have is an owner. No chance to do a symlink/metas/uid then. Hmm.
Quoted 9 lines · Christophe Saout
Am Donnerstag, den 26.08.2004, 21:16 +0100 schrieb Jamie Lokier:
Quoted 7 lines
Quoted 6 lines
| Will it work out if "dir inside file" will only be visible when referred as "file/."?
I'm used to using ls symlink/. to get ls to show me the directory on the far side of a symbolic link. That's a pretty analagous case to the one we're discussing here, I think?
Quoted 5 lines
Quoted 1 line
By the way, do symlinks have metadata? Where do you find it? :)
Oops. :)
At least in reiser4 they don't have, or at least you can't access them.
They do.
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of foo/metas.
That's because lookup for "bar" performs symlink resolution.
Quoted 2 lines
symlinks are special anyway. Their rights are 777. The only thing they
Symlink is represented by normal inode in UNIX. It has full set of attributes. It can even be hard-linked.
Quoted 2 lines
can have is an owner. No chance to do a symlink/metas/uid then. Hmm.
Nikita.
Am Freitag, den 27.08.2004, 01:45 +0400 schrieb Nikita Danilov:
Quoted 7 lines
Quoted 1 line
At least in reiser4 they don't have, or at least you can't access them.
They do.
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of foo/metas.
That's because lookup for "bar" performs symlink resolution.
So I can't access them and it is pointless. ;-)
BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I don't think this makes sense. :)
Quoted 10 lines · Christophe Saout
Am Freitag, den 27.08.2004, 01:45 +0400 schrieb Nikita Danilov:
Quoted 6 lines
Quoted 1 line
At least in reiser4 they don't have, or at least you can't access them.
They do.
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of foo/metas.
Quoted 11 lines
Quoted 3 lines
That's because lookup for "bar" performs symlink resolution.
So I can't access them and it is pointless. ;-)
BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I don't think this makes sense. :)
I prefer this one:
hepburn:/# mount /dev/sda3 on / type reiser4 (rw) hepburn:/# touch apa hepburn:/# chmod +x apa hepburn:/# cd apa hepburn:/apa# ls ls: reading directory .: Not a directory
So there is already file-as-dir with legacy "ls" - and it works just like people seem to want it to do with legacy apps. Not at all.
/Emil
Quoted 6 lines · Christophe Saout
Am Freitag, den 27.08.2004, 01:45 +0400 schrieb Nikita Danilov:
Quoted 4 lines
Quoted 1 line
At least in reiser4 they don't have, or at least you can't access them.
They do.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of foo/metas.
That's because lookup for "bar" performs symlink resolution.
So I can't access them and it is pointless. ;-)
BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I don't think this makes sense. :)
Why? foo/metas is a file system object just like foo. It has owner, permission bits, so access to its meta-data should be provided, and uniform way to provide access to the file system object meta-data is to have these little magic files inside metas directory, which is a file system object just like metas. It has owner^@^@^@^@*** - Lisp stack overflow. RESET
Nikita.
Quoted 1 line
Am Freitag, den 27.08.2004, 02:21 +0400 schrieb Nikita Danilov:
Quoted 9 lines
Quoted 2 lines
BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I don't think this makes sense. :)
Why? foo/metas is a file system object just like foo. It has owner, permission bits, so access to its meta-data should be provided, and uniform way to provide access to the file system object meta-data is to have these little magic files inside metas directory, which is a file system object just like metas. It has owner^@^@^@^@*** - Lisp stack overflow. RESET
Yes, of course. But who's going to need that? The meta files are there to describe regular unix files. They're just exported using a file system name space. I don't think we need metadata to describe metadata. Assuming someone adds a directory inside a file where user can add some attributes/streams/resource forks. As Linus said, they are just attributes, even if they seem to behave like normal files, they're not, they belong to the real file. Adding attributes to attributes to attributes? That would be like adding ACLS to ACLS. Hello the madness. ;-)
There really should be a point where you can't recurse further. Assume there is a backup application that always tries to open every dentry it finds as directory and then recurse. Oops. :-)
Quoted 23 lines · Nikita Danilov
Quoted 6 lines · Christophe Saout
Am Freitag, den 27.08.2004, 01:45 +0400 schrieb Nikita Danilov:
Quoted 4 lines
Quoted 1 line
At least in reiser4 they don't have, or at least you can't access them.
They do.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of foo/metas.
That's because lookup for "bar" performs symlink resolution.
So I can't access them and it is pointless. ;-)
BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I don't think this makes sense. :)
Why? foo/metas is a file system object just like foo. It has owner, permission bits, so access to its meta-data should be provided, and uniform way to provide access to the file system object meta-data is to have these little magic files inside metas directory, which is a file system object just like metas. It has owner^@^@^@^@*** - Lisp stack overflow. RESET
Quoted 12 lines
Nikita.
Quoted 1 line
-
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/
I think Christophe is a bit right here. While in general having meta-meta objects makes sense, in this particular instance, I don't see the functional need for it. Can you supply an example of where it would be useful?
Quoted 33 lines · Hans Reiser
Quoted 20 lines · Nikita Danilov
Quoted 2 lines · Christophe Saout
Am Freitag, den 27.08.2004, 01:45 +0400 schrieb Nikita Danilov:
Quoted 1 line
Quoted 1 line
Quoted 1 line
At least in reiser4 they don't have, or at least you can't
access them.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
They do.
Quoted 1 line
ln -s foo bar; cd bar/metas shows me the content of
foo/metas.
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
That's because lookup for "bar" performs symlink resolution.
So I can't access them and it is pointless. ;-) BTW, I can do a cd metas/metas/metas/metas/plugin/metas... I
don't think
Quoted 1 line
this makes sense. :)
Why? foo/metas is a file system object just like foo. It has owner, permission bits, so access to its meta-data should be provided, and uniform way to provide access to the file system object meta-data is to have these little magic files inside metas directory, which is a file system object just like metas. It has owner^@^@^@^@*** - Lisp stack overflow. RESET
Quoted 11 lines
Nikita.
Quoted 1 line
-
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/
Quoted 1 line
I think Christophe is a bit right here. While in general having meta-meta objects makes sense, in this particular instance, I don't see the functional need for it. Can you supply an example of where it would be useful?
One example is to supply hints about what to do with the attribute if the file is copied / moved. Several types of attributes have been mentioned:
1) Those that are essentially a cached object, which can be re-derived from the source file (e.g. thumbnail image)
2) Those that become invalid if the source file changes (e.g. hash value)
3) Those that should be maintained on file copy (e.g. author, copyright, etc)
4) Those that may not want to be copied with the file (e.g. security keys or the like)
etc.
This could be accomplished without meta-meta information (like permissions), but that wouldn't be very extensible, would it :)
- Steve
Quoted 5 lines · Linus Torvalds
No no. The stream you get from a directory is totally _independent_ of the contents of the directory.
but the user can link filename/metas/body to filename/metas/tar, if we implement a tar plugin, if it happens that the user wants it to be totally dependent.
Quoted 12 lines
Anything else would be pointless.
Linus
-
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/
Quoted 1 line · El Thu, 26 Aug 2004 13:16:22 -0400 (EDT) Rik van Riel <[email protected]>…
So all I need to do is "cat /bin | gzip -9 > /path/to/backup.tar.gz" ?
/bin could be separated (like linus said) but cat /bin/.compound could do it. This is the /etc/passwd Hans' example, I think:
"If /new_syntax_access_path/big_directory_of_small_files/.glued is a plugin that aggregates every file in big_directory_of_small_files with a delimiter separating every file within the aggregation, then one can simply type emacs /new_syntax_access_path/big_directory_of_small_files/.glued, and the filesystem has done all the work emacs needs to be effective at this. Not a line of emacs needs to be changed."
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Diego Calleja
Quoted 1 line
So all I need to do is "cat /bin | gzip -9 > /path/to/backup.tar.gz" ?
/bin could be separated (like linus said) but cat
/bin/.compoundcould do it. This is the/etc/passwdHans' example, I think:
Yes, but what about locking? If we have compound files with individually accessible components a lock on the compound files could lock its components at the same time.
But what with /usr/.compound? Is it read-only? What if you truncate it? Does it atomically delete the whole /usr directory tree? What about reading? It has to go through all these independent files, what if they change while you are reading the compound file? Does it lock everything? Point-in-time snapshot? If reiser4 can't do this. ;-)
I don't say that it's impossible to do but I think it's a lot harder than doing it the other way round.
Quoted 6 lines · Diego Calleja
Quoted 1 line · El Thu, 26 Aug 2004 13:16:22 -0400 (EDT) Rik van Riel <[email protected]>…
So all I need to do is "cat /bin | gzip -9 > /path/to/backup.tar.gz" ?
/bin could be separated (like linus said) but cat
/bin/.compoundcould do it. This is the/etc/passwdHans' example, I think:
Arghhhh. I wrote it down to ridicule the idea and now people are taking it seriously ;(
It should be obvious enough that anything depending on the kernel parsing file contents will lead to problems.
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Quoted 8 lines · Rik van Riel
Quoted 2 lines
/bin could be separated (like linus said) but cat
/bin/.compoundcould do it. This is the/etc/passwdHans' example, I think:Arghhhh. I wrote it down to ridicule the idea and now people are taking it seriously ;(
It should be obvious enough that anything depending on the kernel parsing file contents will lead to problems.
This is one case where the kernel _isn't_ parsing file contents, but I agree it's ridiculous :)
-- Jamie
Quoted 15 lines · Jamie Lokier
Quoted 11 lines · Rik van Riel
Quoted 4 lines
/bin could be separated (like linus said) but cat
/bin/.compoundcould do it. This is the/etc/passwdHans' example, I think:Arghhhh. I wrote it down to ridicule the idea and now people are taking it seriously ;(
It should be obvious enough that anything depending on the kernel parsing file contents will lead to problems.
Quoted 6 lines
This is one case where the kernel _isn't_ parsing file contents, but I agree it's ridiculous :)
-- Jamie
Umm, no, when you write the glued /etc/passwd file it parses the delimiters in it to determine what subfile to put the parts of /etc/passwd into.
Inheritance with delimiters is the best way to make emacs effective for editing lots of small files, Stallman was right and deserves credit for it.
Quoted 7 lines · Jamie Lokier
Why not just install .tgz or .zip files of entire binary packages, and let the filesystem unpack the bits that are needed when they're needed. Some platforms (i.e. Java) do this already with .jar files and it's quite popular. This would extend it in a versatile way.
I like this notion of a plugin that would install a package if one of the package's executables was invoked by its name.
Quoted 10 lines · Rik van Riel
Quoted 3 lines · Denis Vlasenko
I think Hans is not planning turning old "file is a stream of bytes" into eight-stream octopus. One stream will remain as a 'main' one, which contains actual data. Others will keep metadata, etc...
This is exactly what the Samba people want, though.
Office suites can store a document with embedded images and spread sheets "easily" by putting the text, the images and spread sheets all in different file streams.
Kinda far reaching. It's hard to assess whether that is good or bad idea. Can we start small, like putting metadata (e.g. ACLs) into these streams? --
vda
Quoted 6 lines · Denis Vlasenko
Quoted 3 lines
Office suites can store a document with embedded images and spread sheets "easily" by putting the text, the images and spread sheets all in different file streams.
Kinda far reaching. It's hard to assess whether that is good or bad idea. Can we start small, like putting metadata (e.g. ACLs) into these streams?
Openoffice does this in user space and the user space vfs code desktops use can handle zips so this "just works" already including over NFS, unlike a kernel proposed method.
Quoted 4 lines · Alan Cox
Openoffice does this in user space and the user space vfs code desktops use can handle zips so this "just works" already including over NFS, unlike a kernel proposed method.
Hurrah for OpenOffice. Now all you need to do is to persuade Microsoft to store Word files in the same format......
Jeremy.
På su , 29/08/2004 klokka 10:30, skreiv Alan Cox:
Quoted 3 lines
Openoffice does this in user space and the user space vfs code desktops use can handle zips so this "just works" already including over NFS, unlike a kernel proposed method.
NFS is not the roadblock here. Sure v2 and v3 support would be impossible to do, but since this is all 2.6 work anyway, people have the option of using NFSv4, which has full support for streams...
NFSv4 has an OPENATTR call which acts on files to return a filehandle that works fine with both READDIR and LOOKUP, so if a VFS interface for streams existed, we could code up full support tomorrow.
As it is, we're having to shoehorn this into the xattr interface. 8-(
Cheers,
Trond
Quoted 5 lines · Trond Myklebust
NFSv4 has an OPENATTR call which acts on files to return a filehandle that works fine with both READDIR and LOOKUP, so if a VFS interface for streams existed, we could code up full support tomorrow.
As it is, we're having to shoehorn this into the xattr interface. 8-(
Yeah, that's what I'm really trying to avoid for Samba. We're currently using the xattr interface for DOS attributes, and soon for NT ACL support, but it doesn't really fit as a streams interface (no lseek() support) although someone in HP coded up a test interface to NT streams that map into xattrs (most of the streams in a Word file for instance are quite small) - but I really don't want to have to do this :-).
Jeremy.
Quoted 1 line · Jeremy Allison
(most of the streams in a Word file for instance are quite small)
Streams in a Word file?
Are you saying that when I copy a .doc file onto my Linux box and off, I lose part of a Word document?
-- Jamie
Quoted 4 lines · Jamie Lokier
Quoted 1 line · Jeremy Allison
(most of the streams in a Word file for instance are quite small)
Streams in a Word file?
Yep.
Quoted 2 lines
Are you saying that when I copy a .doc file onto my Linux box and off, I lose part of a Word document?
Right now no, because when Samba refuses the stream open, Word falls back into a "tar"-like mode where it linearises the streams into the data (it's a legacy mode for storing data on a FAT drive, not an NTFS drive). However, the problem is that no currently supported Microsoft OS doesn't have streams-capable NTFS support.
This means that in a future MS-Office revision, this backwards support may be broken by accident or by design (less likely, Microsoft really don't do that kind of thing without very high level requests :-) and no testers at Microsoft will notice (because they only test against MS servers).
Jeremy.
Quoted 4 lines · Jeremy Allison
Quoted 1 line
Streams in a Word file?
Yep.
Quoted 8 lines
Quoted 2 lines
Are you saying that when I copy a .doc file onto my Linux box and off, I lose part of a Word document?
Right now no, because when Samba refuses the stream open, Word falls back into a "tar"-like mode where it linearises the streams into the data (it's a legacy mode for storing data on a FAT drive, not an NTFS drive). However, the problem is that no currently supported Microsoft OS doesn't have streams-capable NTFS support.
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand?
Or does FTP lose part of the Word document?
-- Jamie
Quoted 7 lines · Jamie Lokier
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand?
Or does FTP lose part of the Word document?
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Probably a non-Microsoft ftp client would lose part of the word doc.
Jeremy.
Quoted 6 lines · Jeremy Allison
Quoted 5 lines
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand? Or does FTP lose part of the Word document?
Quoted 7 lines
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Probably a non-Microsoft ftp client would lose part of the word doc.
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
The only sensible implementation I can imagine would be if the OS linearised multi-stream Word documents into the non-stream format automatically for all programs which don't know about streams.
Which is of course what I would like to implement for Linux...
- Jamie
Quoted 13 lines · Jamie Lokier
Quoted 12 lines · Jeremy Allison
Quoted 5 lines
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand? Or does FTP lose part of the Word document?
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Quoted 7 lines
Quoted 1 line
Probably a non-Microsoft ftp client would lose part of the word doc.
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Jeremy.
Quoted 16 lines · Jeremy Allison
Quoted 15 lines · Jamie Lokier
Quoted 13 lines · Jeremy Allison
Quoted 5 lines
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand? Or does FTP lose part of the Word document?
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Probably a non-Microsoft ftp client would lose part of the word doc.
Quoted 8 lines
Quoted 5 lines
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
This is shocking. When was this behavior introduced?
Lee
The loss of forks in the file is exxactly the problem you used to have when transferring native Mac files to a PC...
This meant in order to transfer files to different filesystem you often needed to tar/zip/whatever them first.
Bare in mind this would let us do the whole MacOS thing of putting an entire application(plus plugins, etc) inside one "file"...
--Oliver
Quoted 33 lines · Jeremy Allison
Quoted 13 lines · Jamie Lokier
Quoted 12 lines · Jeremy Allison
Quoted 5 lines
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand? Or does FTP lose part of the Word document?
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Quoted 7 lines
Quoted 1 line
Probably a non-Microsoft ftp client would lose part of the word doc.
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Jeremy.
-
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/
Quoted 8 lines · Oliver Hunt
The loss of forks in the file is exxactly the problem you used to have when transferring native Mac files to a PC...
This meant in order to transfer files to different filesystem you often needed to tar/zip/whatever them first.
Bare in mind this would let us do the whole MacOS thing of putting an entire
application(plus plugins, etc)inside one "file"...
hum, well aside from the fact that recent MacOS (X) does not put applications in one "file", it does simply store related stuff inside a directory which is presented as one unit by the GUI ... something I consider useful and which allows to 'move' the application around without rendering them useless ...
best,
Herbert
Quoted 41 lines
--Oliver
Quoted 26 lines · Jeremy Allison
Quoted 13 lines · Jamie Lokier
Quoted 12 lines · Jeremy Allison
Quoted 5 lines
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand? Or does FTP lose part of the Word document?
Good question. It depends if the Microsoft ftp client is streams-aware, and understands the Microsoft OLE structured storage format and will do the linearisation on demand or not. I must confess I haven't tested this, as I don't ever run Windows other than on vmware sessions for Samba testing these days :-).
Quoted 7 lines
Quoted 1 line
Probably a non-Microsoft ftp client would lose part of the word doc.
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Quoted 7 lines
Jeremy.
-
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/-
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/
Quoted 7 lines · Jeremy Allison
Quoted 5 lines
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
And this is why I believe that using streams in application is well, ill-advised. Indeed, one of my concerns with providing streams support is that application authors may make the mistake of using it, and we will be back to the bad old days (when MacOS made this mistake) where you will need to binhex files before you ftp them (and unbinhex them on the otherside) --- and if you forget, the resulting file will be useless.
I understand why the Samba folks want this feature very badly; however, hopefully other projects will know enough *not* to use streams once they become available in Linux....
- Ted
Quoted 9 lines · Theodore Ts'o
Quoted 7 lines · Jeremy Allison
Quoted 5 lines
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Quoted 7 lines
And this is why I believe that using streams in application is well, ill-advised. Indeed, one of my concerns with providing streams support is that application authors may make the mistake of using it, and we will be back to the bad old days (when MacOS made this mistake) where you will need to binhex files before you ftp them (and unbinhex them on the otherside) --- and if you forget, the resulting file will be useless.
At least currently (to my knowledge anyway) all stream support in Windows is data that is not important, and that can be either regenerated from filesystem metadata or (more usually) the main file stream itself.
This sort of data is really where streams excel, by providing a way to access data that would otherwise take time/cpu to regenerate over and over, but that in itself is not indispensable. Good examples of this are indexes of data within a document, details of who owns/created/modified the document, common views or reformatting of the data, etc. With audio/video/graphics, you could store lower quality transforms of data (eg: stereo to mono, resolution reduction, thumbnails, etc) in the streams for a file. With a word document, it could be things like an index (assuming it's auto-generated from section headings). With a database, it could be the indexes, and a few views that are expensive time-wise to generate. All of these are easily regenerated from the original data stream, but takes a while. And if you've got the disk, why not use it?
If streams were always to be considered volatile, then you could do all sorts of interesting things with them. Any disk cleanup mechanism you have could also reap old streams specifically if the disk gets below a certain amount free. This means that old streams that are hanging about don't end up wasting all your disk space. Of course, you'd want a way to disable this (for servers mainly), and streams would have to be considered volatile on more than just Linux as a platform for this to be useful.
Note that I'm not particularly advocating streams here. I'm just pointing out 'how' it could be useful. It could be very easy to misuse streams and cause huge problems (as per Ted's comments), but it's always good to know the other side of the argument.
Signature · 2 lines
Stuart Young (aka Cef) [email protected] is for LKML and related email only
Quoted 16 lines · Stuart Young
Quoted 13 lines · Theodore Ts'o
Quoted 10 lines · Jeremy Allison
Quoted 7 lines
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Quoted 9 lines
Quoted 9 lines
And this is why I believe that using streams in application is well, ill-advised. Indeed, one of my concerns with providing streams support is that application authors may make the mistake of using it, and we will be back to the bad old days (when MacOS made this mistake) where you will need to binhex files before you ftp them (and unbinhex them on the otherside) --- and if you forget, the resulting file will be useless.
This is not a problem with multiple streams implemented right - as a directory. You don't stay away from directories just because you have to tar them in order to put them on ftp sites? ;-)
Still, you're right that apps using streams jsut for the hell of it is bad. That sort of thing happens all the time when something new shows up, some people will use it without thinking.
Quoted 5 lines
At least currently (to my knowledge anyway) all stream support in Windows is data that is not important, and that can be either regenerated from filesystem metadata or (more usually) the main file stream itself.
This sort of data is really where streams excel, by providing a way to access data that would otherwise take time/cpu to regenerate over and over, but that in itself is not indispensable.
Streams as a cache.
Quoted 3 lines
Good examples of this are indexes of data within a document, details of who owns/created/modified the document, common views or reformatting of the data, etc. With audio/video/graphics, you could store lower quality transforms of data (eg: stereo to mono, resolution reduction, thumbnails, etc) in the streams for a file. With a word document, it could be things like an index (assuming it's auto-generated from section headings). With a database, it could be the indexes, and a few views that are expensive time-wise to generate. All of these are easily regenerated from the original data stream, but takes a while. And if you've got the disk, why not use it?
Actually, some if this is bad examples of using streams. Why can't that index be stored _in_ the document?
After all, the word processor is the one who knows the document's internal format, how to generate the index, and how to use it. Well, this example is bad anyway as an index can be created so fast from a well structured document that there is little need for storing one. (Example - see how lyx keeps a live index in the "navigate" menu. . .)
A document format may also contain fields specifying who made it, or even a log of who modified it and when.
It seems to me that streams are more useful for stuff that the file's main application don't deal with itself. Such as attaching icons that follow the file around.
Quoted 2 lines
If streams were always to be considered volatile, then you could do all sorts of interesting things with them. Any disk cleanup mechanism you have could also reap old streams specifically if the disk gets below a certain amount free.
That would limit streams to caching use _only_, disks fill occationally and we can't have _useful_ stuff disappearing at random.
Helge Hafting
Quoted 19 lines · Helge Hafting
Quoted 10 lines · Stuart Young
Quoted 9 lines · Theodore Ts'o
Quoted 7 lines · Jeremy Allison
Quoted 5 lines
So you're saying SCP, CVS, Subversion, Bitkeeper, Apache and rsyncd will _all_ lose part of a Word document when they handle it on a Window box?
Ouch!
Yep. It's the meta data that Word stores in streams that will get lost.
Quoted 7 lines
Quoted 7 lines
And this is why I believe that using streams in application is well, ill-advised. Indeed, one of my concerns with providing streams support is that application authors may make the mistake of using it, and we will be back to the bad old days (when MacOS made this mistake) where you will need to binhex files before you ftp them (and unbinhex them on the otherside) --- and if you forget, the resulting file will be useless.
Quoted 2 lines
This is not a problem with multiple streams implemented right - as a directory.
This works if you want (possibly editable) views of a single document. It doesn't really work that well for other things. Even then, something has to handle all the data translations and decoding, and that means you need to store all the reference information somewhere so that the app knows what to pass the original file to, so that it can be decoded for the user as they've requested.
Quoted 2 lines
You don't stay away from directories just because you have to tar them in order to put them on ftp sites? ;-)
No, but I know a lot of people who don't understand that with a lot of ftp servers that if you append .tar.gz to the directory name, you can fetch the directory. Sure it's all user education, but you have to remember that users don't generally want to be educated. They just want to get on with doing whatever they are doing.
Quoted 3 lines
Still, you're right that apps using streams jsut for the hell of it is bad. That sort of thing happens all the time when something new shows up, some people will use it without thinking.
Hence why I was suggesting the idea of disposable data in streams. As long as people KNOW it's disposable, but useful to keep around as it cuts down the time needed to do stuff, then apps will start to pick up transporting streams properly. Least then (hopefully) no real information will get lost that is important. Once transporting streams becomes commonplace, then perhaps streams can be used for more useful things.
Quoted 9 lines
Quoted 7 lines
At least currently (to my knowledge anyway) all stream support in Windows is data that is not important, and that can be either regenerated from filesystem metadata or (more usually) the main file stream itself.
This sort of data is really where streams excel, by providing a way to access data that would otherwise take time/cpu to regenerate over and over, but that in itself is not indispensable.
Streams as a cache.
Almost exactly.
Quoted 11 lines
Quoted 10 lines
Good examples of this are indexes of data
within a document, details of who owns/created/modified the document, common views or reformatting of the data, etc. With audio/video/graphics, you could store lower quality transforms of data (eg: stereo to mono, resolution reduction, thumbnails, etc) in the streams for a file. With a word document, it could be things like an index (assuming it's auto-generated from section headings). With a database, it could be the indexes, and a few views that are expensive time-wise to generate. All of these are easily regenerated from the original data stream, but takes a while. And if you've got the disk, why not use it?
Quoted 7 lines
Actually, some if this is bad examples of using streams. Why can't that index be stored _in_ the document?
After all, the word processor is the one who knows the document's internal format, how to generate the index, and how to use it. Well, this example is bad anyway as an index can be created so fast from a well structured document that there is little need for storing one. (Example - see how lyx keeps a live index in the "navigate" menu. . .)
The point of such information in my examples is that a stream can store information in a particular format (ie: an index) that is common to one indexing app/library. Such an index can be used by ANY app that knows the index format to search the document. This is almost exactly what MS will do (if they haven't done it already) with the File Indexing Service. As it's ONE library, then any new user app that creates data can add index creation by adding one library. And any app that wants to search these indexes would need only to add one library, not every library for every format that it wants to search. It's essentially an n^2 vs 2n problem.
Quoted 2 lines
A document format may also contain fields specifying who made it, or even a log of who modified it and when.
Exactly, but then you need to:
1. Read in the Document, and in some formats that are either compressed or
that do not have a fixed format, this may mean you end up reading most of or even an entire file to get this data. This is expensive on CPU, disk cache, disk access and transfer times with large files, particularly if it's a slow data bus to the storage device.
2. Parse out the information you want, which means that you need to
understand the format. With an index stream, in a fixed format, you only need one library that can handle the format for you. Without streams, you use lots of libraries. By using lots of libraries, you end up using lots of memory to hold them, and disk access time/transfer speed to load them.
Quoted 3 lines
It seems to me that streams are more useful for stuff that the file's main application don't deal with itself. Such as attaching icons that follow the file around.
Icons themselves wouldn't be that good for multi-user environments. Attaching an icon type designator that then allows the app that wants to display an icon for the file to pull the appropriate icon from somewhere else (and therefore can be matched to whatever theme or specific icon the user wants) is probably a better idea.
Quoted 7 lines
Quoted 4 lines
If streams were always to be considered volatile, then you could do all sorts of interesting things with them. Any disk cleanup mechanism you have could also reap old streams specifically if the disk gets below a certain amount free.
That would limit streams to caching use _only_, disks fill occationally and we can't have _useful_ stuff disappearing at random.
If they transfer a file with streams on Windows using standard (Posix based) tools at the moment then they lose this information anyway. And application developers aren't all suddenly going to drop whatever it is they're doing to implement stream support as soon as it appears. Things take time, and till the majority of applications support it, it's useless to assume that the data is not going to dissapear because of a user using a non-updated tool. By limiting it to caching, at least in the short term, at least no one is going to (hopefully!) get bitten by data loss. Later (and I'm guessing a LOT later), who knows, streams could actually become useful for more than just caching.
Signature · 2 lines
Stuart Young (aka Cef) [email protected] is for LKML and related email only
Stuart Young <[email protected]> said:
[...]
Quoted 6 lines
Hence why I was suggesting the idea of disposable data in streams. As long as people KNOW it's disposable, but useful to keep around as it cuts down the time needed to do stuff, then apps will start to pick up transporting streams properly. Least then (hopefully) no real information will get lost that is important. Once transporting streams becomes commonplace, then perhaps streams can be used for more useful things.
How will you prevent people putting the "real" data under some random stream, "just because it is a prettier name"? (Yes, I've seen Windows users exporting everything because they found the folder + hand icon prettier...). Short answer: You can't. And if you did, then it would be (another) hell to go through when you start using streams for "useful data".
[...]
Quoted 3 lines
The point of such information in my examples is that a stream can store information in a particular format (ie: an index) that is common to one indexing app/library.
Great. Now you just need to convince everybody and Aunt Tillie to use that same format.
Quoted 7 lines
Such an index can be used by ANY app that knows the
index format to search the document. This is almost exactly what MS will do (if they haven't done it already) with the File Indexing Service. As it's ONE library, then any new user app that creates data can add index creation by adding one library. And any app that wants to search these indexes would need only to add one library, not every library for every format that it wants to search. It's essentially an n^2 vs 2n problem.
Doable if you can just go and force a format/stream layout/application suite on each and every user. Won't happen in Linux (and I'm happy for that).
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 10 lines · Horst von Brand
Quoted 6 lines · Stuart Young
Hence why I was suggesting the idea of disposable data in streams. As long as people KNOW it's disposable, but useful to keep around as it cuts down the time needed to do stuff, then apps will start to pick up transporting streams properly. Least then (hopefully) no real information will get lost that is important. Once transporting streams becomes commonplace, then perhaps streams can be used for more useful things.
How will you prevent people putting the "real" data under some random stream, "just because it is a prettier name"?
This is a function of exporting something complex like file streams through a namespace like 'file-as-directory'. As soon as you start putting complex things like file streams through an 'easy to use' interface, you will get people using it in ways you don't expect. Sure, it has to be useful, and relatively easy, but you don't need to make it insanely so.
And if it's all considered volatile, the only ones that NEED to know about it are system admins, power users and programmers, all of which have a much higher chance of understanding a complex object like a file stream.
Quoted 5 lines
(Yes, I've seen Windows users
exporting everything because they found the folder + hand icon prettier...). Short answer: You can't. And if you did, then it would be (another) hell to go through when you start using streams for "useful data".
Interesting you should say that. Pretty much every stream in Windows at the moment is considered to be volatile, as the information could be lost in a transfer to a networked machine or filesystem that is not stream enabled. Once Windows NT and Win98/ME are 'out of the picture', and FAT* filesystems vanish, this sort of behaviour could possibly be expected to change. Notice that it's a timeframe over about 5 yrs that they've been (almost silently) doing this already. They'll have much the same problem. Since I seriously doubt that streams are going to pop up in Linux overnight, with all the app support that this entails, we'll have the benefit of seeing just how the behemoth handles it, and be able to learn from their mistakes.
Of note on this, the ability to create/manipulate/read/etc streams should almost certainly require it's own set of ACL's beyond blindly assuming that the standard permissions/ACL's can cover it as is. Document creators should be able to create/manipulate a stream, but a searching service does not necessarily need to do more than read it. You could even have the ability to access or write to a stream other than the default covered by a capability.
Quoted 6 lines
Quoted 3 lines
The point of such information in my examples is that a stream can store information in a particular format (ie: an index) that is common to one indexing app/library.
Great. Now you just need to convince everybody and Aunt Tillie to use that same format.
Welcome to standardisation. And in fact it's not so much necessary that everyone uses the same index format, as long as the same index format is used on one machine. In fact, it's not even that necessary, as each index format could use it's own stream to store it's version of the information. Yes it's duplication, but who isn't already used to that? (KDE/Gnome, vi/emacs, ext3/XFS/reiser/etc). You choose the format for the job, and by personal preference. If the apps don't support the format you want, you just lose whatever abilities the format gains you, but at least you don't lose the raw data.
Quoted 11 lines
Quoted 7 lines
Such an index can be used by ANY app that knows the
index format to search the document. This is almost exactly what MS will do (if they haven't done it already) with the File Indexing Service. As it's ONE library, then any new user app that creates data can add index creation by adding one library. And any app that wants to search these indexes would need only to add one library, not every library for every format that it wants to search. It's essentially an n^2 vs 2n problem.Doable if you can just go and force a format/stream layout/application suite on each and every user. Won't happen in Linux (and I'm happy for that).
As above.
My personal view of streams (if we MUST have it under Linux, and I'm in no way at all convinced of that fact) is that it should in many ways be like journaling or hash trees in ext3. They're useful functions, but they are not 'necessary' to the actual storage of data. Sure, they make it easy (and in some cases significantly easier) to recover or access data, but they are features that do not ultimately stop you using the core of the filesystem, it's main objective, which is storing data.
Signature · 2 lines
Stuart Young (aka Cef) [email protected] is for LKML and related email only
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jeremy" == Jeremy Allison <[email protected]> writes:
Jeremy> Good question. It depends if the Microsoft ftp client is Jeremy> streams-aware, and understands the Microsoft OLE structured Jeremy> storage format and will do the linearisation on demand or not. I Jeremy> must confess I haven't tested this, as I don't ever run Windows Jeremy> other than on vmware sessions for Samba testing these days :-).
Jeremy> Probably a non-Microsoft ftp client would lose part of the word Jeremy> doc.
What about email. If someone uses a non-MS mail client, it'll lose part of the Word doc? Does that mean nobody can email me Word docs any
more? <pause> Wait a sec, that's a good thing! ;-)
Signature · 4 lines
Hubert Chan <[email protected]> - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
what happens when you ue one of the many software packages around that lets windows access a NFS server. when you copy the file to a NFS accessed drive does it loose part of the data?
David Lang
Quoted 42 lines · Jamie Lokier
Date: Wed, 1 Sep 2004 21:31:01 +0100
From: Jamie Lokier <[email protected]>
To: Jeremy Allison <[email protected]>
Cc: Trond Myklebust <[email protected]>,
Alan Cox <[email protected]>,
Denis Vlasenko <[email protected]>,
Rik van Riel <[email protected]>, Christer Weinigel <[email protected]>, Spam <[email protected]>, Andrew Morton <[email protected]>, [email protected], Linus Torvalds <[email protected]>, [email protected], [email protected], Linux Filesystem Development <[email protected]>, Linux Kernel Mailing List <[email protected]>, [email protected], [email protected]
Subject: Re: silent semantic changes with reiser4Quoted 4 lines · Jeremy Allison
Quoted 1 line
Streams in a Word file?
Yep.
Quoted 8 lines
Quoted 2 lines
Are you saying that when I copy a .doc file onto my Linux box and off, I lose part of a Word document?
Right now no, because when Samba refuses the stream open, Word falls back into a "tar"-like mode where it linearises the streams into the data (it's a legacy mode for storing data on a FAT drive, not an NTFS drive). However, the problem is that no currently supported Microsoft OS doesn't have streams-capable NTFS support.
I meant when I copy not using Samba. For example, I copy the .doc file in Windows NT to an FTP server.
Does the FTP operation magically linearise the .doc streams on demand?
Or does FTP lose part of the Word document?
-- Jamie
-
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/
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Quoted 5 lines · Jeremy Allison
Right now no, because when Samba refuses the stream open, Word falls back into a "tar"-like mode where it linearises the streams into the data (it's a legacy mode for storing data on a FAT drive, not an NTFS drive). However, the problem is that no currently supported Microsoft OS doesn't have streams-capable NTFS support.
That implies that samba can do the same transform set without kernel help and you'd even get the advantages of being able to transfer the stuff around sanely afterwards.
What I don't understand is the tie between Linux having such streams and Windows doing it for Samba to work. Netatalk has always handle this for Macintosh and portably. Presumably any Samba support would need to handle OS's without wacky files for portability too ?
Am Donnerstag, 2. September 2004 11:48 schrieb Alan Cox:
Quoted 4 lines
What I don't understand is the tie between Linux having such streams and Windows doing it for Samba to work. Netatalk has always handle this for Macintosh and portably. Presumably any Samba support would need to handle OS's without wacky files for portability too ?
Can you do an atomic rename of all streams without kernel support?
Regards
Oliver
Quoted 7 lines · Oliver Neukum
Am Donnerstag, 2. September 2004 11:48 schrieb Alan Cox:
Quoted 4 lines
What I don't understand is the tie between Linux having such streams and Windows doing it for Samba to work. Netatalk has always handle this for Macintosh and portably. Presumably any Samba support would need to handle OS's without wacky files for portability too ?
Can you do an atomic rename of all streams without kernel support?
That depends how SAMBA chooses to handle the problem internally and how it chooses to store the data. The netatalk people have atomicity from the view of clients but not from the unix fs internal view.
Alan
Quoted 4 lines · Alan Cox
What I don't understand is the tie between Linux having such streams and Windows doing it for Samba to work. Netatalk has always handle this for Macintosh and portably. Presumably any Samba support would need to handle OS's without wacky files for portability too ?
I'm not 100% sure on the samba side, but I think there is a pretty significant difference. On the Mac, the problem of copying forks and metadata onto non-Mac systems was recognized early on. There are several standard formats for serialized versions of this data. If you take the files that netatalk writes and copy them directly to a Mac separately, there are tools that can convert them back to the original format with all the data intact. I've never seen such a thing for NTFS named streams.
Brad Boyer
[email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Brad Boyer wrote:
| On Thu, Sep 02, 2004 at 10:48:46AM +0100, Alan Cox wrote: | |>What I don't understand is the tie between Linux having such streams and |>Windows doing it for Samba to work. Netatalk has always handle this for |>Macintosh and portably. Presumably any Samba support would need to |>handle OS's without wacky files for portability too ? | | | I'm not 100% sure on the samba side, but I think there is a pretty | significant difference. On the Mac, the problem of copying forks and | metadata onto non-Mac systems was recognized early on. There are several | standard formats for serialized versions of this data. If you take the | files that netatalk writes and copy them directly to a Mac separately, | there are tools that can convert them back to the original format with | all the data intact. I've never seen such a thing for NTFS named streams.
I had an idea for how to solve this. Search the archives for "serialization" or "serialize".
Basically, it involves creating a better interface to a better "dump". You do
cat foo/serialize > foo.img
and send foo.img over the network. Or you just tell mutt/scp/whatever to grab foo/serialize instead of foo. Can't be worse than a mac resource fork, and it looks more user-friendly to me. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQIVAwUBQTlauHgHNmZLgCUhAQK7Iw//SAi7I84OIz4xHh5S7i1xc+JugPvELyh2 dvrVkETvQlvRcABZ0GYlCQQPPzL+QcTVnruMRAUZGrGCPJdTkxfae41tX5KDS8/4 OpPWEDki+FSJrv+Mn9Pbm3I5Bxlhu0+nuNOIS0HSULo+/IBV4f/ldv8TUKSbXeXJ YjAXJJECpWTlYwF8sTvM/ALHpo+6xEtJq5gQxoUFnw4Pio8eycalS9m2cDs/N6rq PYcOjb7pWjGEk+9qimmwIcX5LnBXl8L9OhXqMQoR3Of+blniIrEOtg/0WLrwzu62 rW+rBxDAfoDxIZZvquf/gyJ6stO8QzGeQqoxxTUXhbI5PUtD+qGO+tWT6+/EljHF qNri65JwB8PetbqdjWmsTO3V+FVSRy3hu4/vTNpnmwnR8H+yilWWDc7Tnsjql+dh 9j4ycfT5xDAA9dC6APOSV5AEgI9z8FntQZzOCPe1lyLD7Qwjdak+3Nw2I3yNS+Pl Xa5ijSm3IKJ+JqKpZKRzCRyXRQdeAj2kGaWQP4Ui3D/RwBEHtn7shwdJ9Hku6KkN 9ZyiTPqY5XGiyLrJWqRc9MraepGhuxxtYcq65A+vdJq2fxA5+XRF8UGbYc9KW5lF 1fYSXA2DBNJjeNEvZw8LWI54OrIMSlhj3dWLX8WkkXog2gWO7ly0E6OiA0odZV6M i9sDeRClqlM=
=CFb4
-----END PGP SIGNATURE-----
Quoted 11 lines · Alan Cox
Quoted 6 lines · Denis Vlasenko
Quoted 3 lines
Office suites can store a document with embedded images and spread sheets "easily" by putting the text, the images and spread sheets all in different file streams.
Kinda far reaching. It's hard to assess whether that is good or bad idea. Can we start small, like putting metadata (e.g. ACLs) into these streams?
Openoffice does this in user space and the user space vfs code desktops use can handle zips so this "just works" already including over NFS, unlike a kernel proposed method.
OpenOffice is very sensible, and I agree that a method of handling document parts that _requires_ kernel support would be foolish.
However, please see my message "The argument for fs assistance in handling archives" for how kernel support can improve performance of programs like OpenOffice on large compound documents, while preserving the sensible behaviour and remaining portable.
-- Jamie
Quoted 7 lines · Denis Vlasenko
I think Hans is not planning turning old "file is a stream of bytes" into eight-stream octopus. One stream will remain as a 'main' one, which contains actual data. Others will keep metadata, etc...
Note that even today's files aren't simple "streams of bytes" because they also have names,mode bits etc.
This is just exactly how NTFS does work: there's an unnamed stream (which is the one that the majority of userspace programs do manipulate) which contains the user data (the pixels from a PMG image, or text from a text file, etc.), and there are named streams which not all kind of applications do know how to handle.
Quoted 3 lines · Andrew Morton
All of which can be handled in userspace library code.
What compelling reason is there for doing this in the kernel?
There's a compelling reason to do it in userspace. If an unaware program copies or moves such a file with streams inside, it doesn't break the streams and aware programs will continue to see them.
OTOH, if we had the streams in the kernel, unaware applications would continuously break the metadata and streams that the streams aware programs expect !
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Quoted 4 lines · Rik van Riel
Quoted 3 lines
All of which can be handled in userspace library code.
What compelling reason is there for doing this in the kernel?
Quoted 8 lines
There's a compelling reason to do it in userspace. If an unaware program copies or moves such a file with streams inside, it doesn't break the streams and aware programs will continue to see them.
OTOH, if we had the streams in the kernel, unaware applications would continuously break the metadata and streams that the streams aware programs expect !
You appear not to have read any of my mails on this topic.
Properly implemented metadata can:
(1) operate in both modes simultaneously;
(2) work with unaware applications;
(3) provide performance enhancements to aware applications;
(4) provide storage enhancements to both;
(5) provide useful features that work with standard unmodified unix tools,
all at once. That includes program copies.
-- Jamie
Quoted 1 line · Jamie Lokier
Properly implemented metadata can:
[snip world peace]
Quoted 1 line
all at once. That includes program copies.
Show me the design for such a properly implemented thing.
None of the designs I've seen proposed so far are able to do what you claim.
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Quoted 10 lines · Rik van Riel
Quoted 5 lines · Andrew Morton
All of which can be handled in userspace library code.
What compelling reason is there for doing this in the kernel?
Quoted 11 lines
There's a compelling reason to do it in userspace. If an unaware program copies or moves such a file with streams inside, it doesn't break the streams and aware programs will continue to see them.
OTOH, if we had the streams in the kernel, unaware applications would continuously break the metadata and streams that the streams aware programs expect !
Well, first off, you don't want streams in the kernel, you want all the little pieces that can be composed together into a stream if you so choose. Streams are ugly, the pieces are all cool.
Quoted 10 lines · Andrew Morton
Quoted 5 lines · Spam
Yes, for example documents, image files etc. The multiple data streams can contain thumbnails, info about who is editing the file (useful for networked files) etc. Could be used for version handling and much more.
All of which can be handled in userspace library code.
What compelling reason is there for doing this in the kernel?
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it). Without kernel support you have to have all apps agree on a data format. And that's harder to do than getting linux kernel VFS engineers to agree on things :-).
Jeremy.
Quoted 4 lines · Jeremy Allison
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it).
So your backup software ignores it, and after a restore you've lost your new metadata ?
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Quoted 8 lines · Rik van Riel
Quoted 4 lines · Jeremy Allison
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it).
So your backup software ignores it, and after a restore you've lost your new metadata ?
I think there's no easy way to fix this, except fixing the backup software to support xattrs's/streams/forks/whatever. Even on Windows, it has happened this way with older apps that don't support named streams.
Quoted 9 lines · Rik van Riel
Quoted 4 lines · Jeremy Allison
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it).
So your backup software ignores it, and after a restore you've lost your new metadata ?
Yes, but then you fix your backup software and everyone lives happily ever after :-)......
It's a better solution than changing *every single application in existance* (the "userspace library" approach).
IMHO of course.
Jeremy.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jeremy" == Jeremy Allison <[email protected]> writes:
Quoted 8 lines · Rik van Riel
Quoted 8 lines · Jeremy Allison
Quoted 4 lines
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it).
So your backup software ignores it, and after a restore you've lost your new metadata ?
Jeremy> Yes, but then you fix your backup software and everyone lives Jeremy> happily ever after :-)......
Also, once you add support for file-as-dir, you can export any new metadata that you want through that interface, so backup software will be able to handle any new stuff you want to throw at it (ACLs, xattrs, streams, etc.).
If anything, I'd say that needing to fix backup software is an argument *for* adding file-as-dir semantics: no need to make any more changes after this one (and it shouldn't be that big of a change, since backup software already knows how to handle files, and how to handle dirs).
Jeremy> IMHO of course.
ditto.
Signature · 4 lines
Hubert Chan <[email protected]> - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
Well said.
Quoted 14 lines · Jeremy Allison
Yes, but then you fix your backup software and everyone lives
happily ever after :-)......
It's a better solution than changing *every single application in existance* (the "userspace library" approach).
IMHO of course.
Jeremy.
I think Jeremy is accurate in saying the below.
Quoted 18 lines · Jeremy Allison
Quoted 3 lines
What compelling reason is there for doing this in the kernel?
Because without kernel support there is no way someone can publish a new metadata type and have it automatically supported by all application data files (ie. most apps ignore it, and only apps that are aware of it can see it). Without kernel support you have to have all apps agree on a data format. And that's harder to do than getting linux kernel VFS engineers to agree on things :-).
Jeremy.
Quoted 9 lines · Andrew Morton
Quoted 7 lines · Spam
Quoted 4 lines
In other words, if reiserfs does something special, we should make standard interfaces for doing that special thing, so that everybody can do it without stepping on other peoples toes.
Agreed that would be the best. But how much time and effort will it be
Quoted 6 lines
Zero.
We can add these new features tomorrow, as reiser4-only features, with a plan in hand to generalise them later.
-->>__if__<<-- we think these are features which Linux should offer.
Please don't forget that if the reiser4 features are merged as they are now, then we will likely be stuck with the API reiser4 chooses. There will be tools that will rely on it springing up no doubt.
Moving the reiser4 features to VFS later is fine and good, but what if the VFS doesn't want the same API for those features? Either we would have to allow reiser4 to continue providing the old API even though the VFS now provides a new, shiny API or we would have to break all existing API users on reiser4. Things like "I rebooted into the latest kernel and my computer failed to boot because essential app FOO failed to access the reiser4 API - Help!" spring to mind.
Yes, I know I am painting a rather black picture here and I know you might well say "screw apps", its been done plenty of times in Linux kernel development before...
Best regards,
Anton
Signature · 4 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
Quoted 11 lines · Anton Altaparmakov
Please don't forget that if the reiser4 features are merged as they are now, then we will likely be stuck with the API reiser4 chooses. There will be tools that will rely on it springing up no doubt.
Moving the reiser4 features to VFS later is fine and good, but what if the VFS doesn't want the same API for those features? Either we would have to allow reiser4 to continue providing the old API even though the VFS now provides a new, shiny API or we would have to break all existing API users on reiser4. Things like "I rebooted into the latest kernel and my computer failed to boot because essential app FOO failed to access the reiser4 API - Help!" spring to mind.
Quoted 3 lines · Andrew Morton
b) accept the reiser4-only extensions with a view to turning them into kernel-wide extensions at some time in the future, so all filesystems will offer the extensions (as much as poss) or
If option b) is chosen Reiser4 can become a playground.
There is the reiser4() syscall which you surely don't want to implement for other filesystems.
Once there is some experience with this new fancy stuff the dust what is useful/insecure, etc. and what is not will settle and can be condensed into a vfs api.
Apps like samba and user scripts will have to be adapted once this is the case, but this should not be to big a problem if this stuff is marked experimental.
People which want something stable can continue to use xattrs and a magnitude of filesystems for now.
Signature · 1 line
lg, Chris
Quoted 2 lines · Christian Mayrhuber
There is the
reiser4()syscall which you surely don't want to implement for other filesystems.
Actually a syscall that goes into filesystem code is the last thing we want. But it's not in the submission, so let's keep that flame^H^H^H^Hdiscussion for later.
Quoted 9 lines
Once there is some experience with this new fancy stuff the dust what is useful/insecure, etc. and what is not will settle and can be condensed into a vfs api.
Apps like samba and user scripts will have to be adapted once this is the case, but this should not be to big a problem if this stuff is marked experimental.People which want something stable can continue to use xattrs and a magnitude of filesystems for now.
Sure, no one stops you from playing around with new semantics. But please don't add them to the linux kernel stable series until we have semantics we
a) want to stick to for a while and b) actually work.
Quoted 3 lines · Christoph Hellwig
Sure, no one stops you from playing around with new semantics. But please don't add them to the linux kernel stable series until we have semantics we
a) want to stick to for a while and b) actually work.
He's not proposing to add it to 2.4, is he?
OG.
Quoted 6 lines · Olivier Galibert
Quoted 3 lines · Christoph Hellwig
Sure, no one stops you from playing around with new semantics. But please don't add them to the linux kernel stable series until we have semantics we
a) want to stick to for a while and b) actually work.He's not proposing to add it to 2.4, is he?
We're talking about 2.6 here. 2.4 is the obsolete kernel series these days.
Quoted 3 lines · Christoph Hellwig
Quoted 1 line · Olivier Galibert
He's not proposing to add it to 2.4, is he?
We're talking about 2.6 here. 2.4 is the obsolete kernel series these days.
So run it in -mm or fork it to 2.7.
2.7 might not be a bad idea for trying such bleeding edge revolution stuff as this.
Signature · 1 line
mjt
Quoted 2 lines · Markus Törnqvist
2.7 might not be a bad idea for trying such bleeding edge revolution stuff as this.
I already suggested to Linus that 2.7 is probably the right place to experiment with that.
Quoted 11 lines · Markus Törnqvist
Quoted 5 lines · Christoph Hellwig
Quoted 1 line · Olivier Galibert
He's not proposing to add it to 2.4, is he?
We're talking about 2.6 here. 2.4 is the obsolete kernel series these days.
So run it in -mm or fork it to 2.7.
2.7 might not be a bad idea for trying such bleeding edge revolution stuff as this.
If I remember right, there are now some reasons for a 2.7:
1) udev / dynamic device numbers
2) enhanced filesystem semantics
maybe resulting in
3) visible automounter mountpoints
Signature · 1 line
lg, Chris
Quoted 6 lines · Olivier Galibert
Quoted 3 lines · Christoph Hellwig
Sure, no one stops you from playing around with new semantics. But please don't add them to the linux kernel stable series until we have semantics we
a) want to stick to for a while and b) actually work.He's not proposing to add it to 2.4, is he?
2.6 is a stable series...
Quoted 1 line
OG.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 11 lines · Spam
Quoted 6 lines
The fact that one filesystem will
offer features which other filesystems do not and cannot offer makes me queasy for some reason.This last sentence makes me wonder. Where is Linux heading? The idea
that a FS cannot contain features that no other FS has is very
scary.
Quoted 13 lines
I am all for uniformity, but not at the expense of shutting down advanced progress that Linux is so badly needing.
This talk about old UNIX seems like people want to still live in the 70'ies and not look forward. Please wake up!
~S
well said.
Quoted 10 lines · Andrew Morton
Quoted 3 lines · Hans Reiser
I had not intended to respond to this because I have nothing positive to say, but Andrew said I needed to respond and suggested I should copy Linus.
Yes, but I didn't say "flame Christoph and ignore the issues" ;)
Oh....;-)
Quoted 6 lines
There are lots of little things to do with implementation, coding style, module exports, deadlocks, what code goes where, etc. These are all normal daily kernel business and we should set them aside for now and concentrate on the bigger issues.
Yes, you are right, but I am not sure Viro will go along with that..... ;-)
Quoted 12 lines
And as I see it, there are two big issues:
a) reiser4 extends the Linux API in ways which POSIX/Unix/etc do not anticipate and
b) it does this within the context of just a single filesystem.
I see three possible responses:
a) accept the reiser4-only extensions as-is (possibly with post-review modifications, of course) or
Quoted 9 lines
b) accept the reiser4-only extensions with a view to turning them into kernel-wide extensions at some time in the future, so all filesystems will offer the extensions (as much as poss) or
c) reject the extensions.
My own order of preference is b) c) a).
I don't object to b), though I think b) should wait for 2.7 and reiser4 should not.
Quoted 5 lines
The fact that one filesystem will
offer features which other filesystems do not and cannot offer makes me queasy for some reason.
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database functionality into the filesystem. It takes 11 years of serious research to build a clean storage layer able to handle doing that. Reiser4 has done that, finally. None of the other Linux filesystems have. The next major release of ReiserFS is going to be bursting with semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites. They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards. Help me get the next level on the tower before they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....
Give Saveliev and I some credit. 10 years of hard work at an ivory tower nobody thought mattered. Now the battle leaves the browser and swings our way. Don't duplicate that infrastructure, use it.
There is so much we could use help with if talented people like you chose to contribute.
Quoted 9 lines
b) means that at some time in the future we need to hoist the reiser4 extensions (at a conceptual level) (and probably with restrictions) up into the VFS. This will involve much thought, argument and work.
To get us started on this route it would really help me (and, probably, others) if you could describe what these API extensions are in a very simple way, without referring to incomprehehsible web pages,
what is not comprehensible....?
Quoted 4 lines
and without
using terms which non-reiser4 people don't understand.
Well, I agree that there is value in defining things in more detail than we have.
Quoted 21 lines
It would be best if each extension was addressed in a separate email thread.
We also need to discuss what a reiser4 "module" is, what its capabilities are, and what licensing implications they have.
Then, we can look at each one and say "yup, that makes sense - we want Linux to do that" and we can also think about how we would implement it at the VFS level.
If we follow the above route I believe we can make progress in a technical direction and not get deadlocked on personal/political stuff.
Now, an alternative to all the above is to just merge reiser4 as-is, after addressing all the lower-level coding issues. And see what happens. That may be a thing which Linus wishes to do. I'm easy.
Quoted 6 lines · Hans Reiser
Quoted 5 lines
To get us started on this route it would really help me (and, probably, others) if you could describe what these API extensions are in a very simple way, without referring to incomprehehsible web pages,
what is not comprehensible....?
Pretty much anything at www.namesys.com. The amount of time which is needed to extract the technical info which one is looking for vastly exceeds a gnat-like attention span.
As a starting point, please prepare a bullet-point list of userspace-visible changes which the filesystem introduces, or is planned to introduce.
And describe the "plugin" system. Why does the filesystem need such a thing (other filesystems get their features via `patch -p1')?
And what are the licensing implications of plugins? Are they derived works? Must they be GPL'ed?
Quoted 15 lines · Andrew Morton
Quoted 7 lines · Hans Reiser
Quoted 4 lines
To get us started on this route it would really help me (and, probably, others) if you could describe what these API extensions are in a very simple way, without referring to incomprehehsible web pages,
what is not comprehensible....?
Pretty much anything at www.namesys.com. The amount of time which is needed to extract the technical info which one is looking for vastly exceeds a gnat-like attention span.
Quoted 8 lines
As a starting point, please prepare a bullet-point list of userspace-visible changes which the filesystem introduces, or is planned to introduce.
And describe the "plugin" system. Why does the filesystem need such a thing (other filesystems get their features via `patch -p1')?
It takes 6 months or more to become competent to change a usual filesystem. Creating a new reiser4 plugin is a weekend programmer fun hack to do. Weekend programmers matter, because they tend to have clever ideas based on understanding a need they have. How many people can easily add new features to ext3 or reiserfs V3? Very few.
What happens if you need a disk format change?
Well, in V4, you can easily compose a plugin from plugin methods of other plugins, write a little piece of code with the one thing you want different, and add it in. Disk format changes, no big deal, add a new disk format plugin, or a new item plugin, or a new node plugin, etc., and you got your new format.
There is a huge difference between code that is designed for reuse, and code that is not. That is the difference between V3 and V4. We were looking at our V3 balancing code, and it special cased each different kind of item (an item is a piece of something, which the balancing code chops objects into as it squeezes them into nodes). It looked like the complexity of the balancing code was going to be N squared, where N was the number of different kinds of items.
So, we created item handlers, and wrote balancing code that could slice and dice and merge any item that implemented all of the operations required of an item handler. From there it grew, and we made everything pluggable.
Adding features to the new code is far less than the time cost of adding features to the old code. I've seen Nikita complain that something would take 6 weeks to do (changing key assignment algorithms), and then it takes him 3 afternoons, and it was because of the plugins, because when we did something similar in V3 it took 3 man months.
Quoted 3 lines
And what are the licensing implications of plugins? Are they derived works?
Yes.
Hans
Quoted 12 lines · Hans Reiser
Quoted 5 lines · Andrew Morton
And describe the "plugin" system. Why does the filesystem need such a thing (other filesystems get their features via `patch -p1')?
It takes 6 months or more to become competent to change a usual filesystem. Creating a new reiser4 plugin is a weekend programmer fun hack to do. Weekend programmers matter, because they tend to have
clever ideas based on understanding a need they have. How many people
can easily add new features to ext3 or reiserfs V3? Very few.
Quoted 8 lines
What happens if you need a disk format change?
Well, in V4, you can easily compose a plugin from plugin methods of other plugins, write a little piece of code with the one thing you want different, and add it in. Disk format changes, no big deal, add a new disk format plugin, or a new item plugin, or a new node plugin, etc., and you got your new format.
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
If so, then Hans has an excellent point. Users do want this kind of thing, and it is worth having to fix tar et al.
Lee
Am Donnerstag, den 26.08.2004, 15:26 -0400 schrieb Lee Revell:
Quoted 6 lines
Quoted 5 lines
Well, in V4, you can easily compose a plugin from plugin methods of other plugins, write a little piece of code with the one thing you want different, and add it in. Disk format changes, no big deal, add a new disk format plugin, or a new item plugin, or a new node plugin, etc., and you got your new format.
Quoted 6 lines
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
No, the underlying storage must be a reiser4-like tree. If you want to mount an MPC drive, write an MPC filesystem.
Quoted 16 lines · Christophe Saout
Am Donnerstag, den 26.08.2004, 15:26 -0400 schrieb Lee Revell:
Quoted 11 lines
Quoted 3 lines
Well, in V4, you can easily compose a plugin from plugin methods of other plugins, write a little piece of code with the one thing you want different, and add it in. Disk format changes, no big deal, add a new disk format plugin, or a new item plugin, or a new node plugin, etc., and you got your new format.
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
Quoted 2 lines
No, the underlying storage must be a reiser4-like tree.
Not necessarily. We just encourage it.... Reiser4 is a body of code that can be sliced and diced as you choose, and it is designed for easy slicing.
Quoted 5 lines
If you want to
mount an MPC drive, write an MPC filesystem.
However, this last sentence is probably sensible advice. A mount point is probably the right interface from reiser4 for what you want.
Quoted 3 lines · Hans Reiser
Not necessarily. We just encourage it.... Reiser4 is a body of code that can be sliced and diced as you choose, and it is designed for easy slicing.
So what about slicing it into a simple posix fs as a start so we can review that while still discussing semantic issues. Now that would be a refreshing thing after all that talking, no?
Quoted 9 lines · Lee Revell
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
If so, then Hans has an excellent point. Users do want this kind of thing, and it is worth having to fix tar et al.
You don't need reiser4 for that, writing read-only linux filesystems is trivial as soon as you have a specification of the ondisk format.
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Lee Revell
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
Quoted 6 lines
Quoted 2 lines
If so, then Hans has an excellent point. Users do want this kind of thing, and it is worth having to fix tar et al.
You don't need reiser4 for that, writing read-only linux filesystems is trivial as soon as you have a specification of the ondisk format.
Of course I could just write an MPC filesystem driver. And, like Andrew said, a filesystem normally gets new features with 'patch -p1'. My question, which was answered by a previous post, was whether the same could be done in a reiser4 plugins.
Lee
Hello,
Quoted 9 lines · Lee Revell
Quoted 7 lines · Hans Reiser
Well, in V4, you can easily compose a plugin from plugin methods of other plugins, write a little piece of code with the one thing you want different, and add it in. Disk format changes, no big deal, add a new disk format plugin, or a new item plugin, or a new node plugin, etc., and you got your new format.
Quoted 7 lines
OK, real world example. My roommate has an AKAI MPC-2000, a very popular hardware sampler from the 90's. The disk format is known,there are a few utilities to edit the disks on a PC and extract the PCM samples, but there are no tools to mount it on a modern PC. Are you saying that, since I know the MPC disk format, I could write a reiser4 plugin to mount an MPC drive?
Another example: Can ext2/etx3/reiserfsv3/xfs be implemented as reiser4 plugins? From Hans' words it seems so. If this is correct, then maybe reiser4 core should be updated to completely replace current VFS layer? Then it's a good point to create a branch (in old development model it would be 2.7, dunno for new :), replace VFS layer with reiser4 core, and rewrite all (or at least most used) FS as reiser4 plugins. Then everybody will be happy.
But this looks too good to be true. Perhaps I misunderstood Hans' words aboud 'new disk format', did I?
Signature · 2 lines
With best wishes Dmitry Baryshkov
Am Freitag, den 27.08.2004, 00:30 +0400 schrieb Dmitry Baryshkov:
Quoted 10 lines
Another example: Can ext2/etx3/reiserfsv3/xfs be implemented as reiser4 plugins? From Hans' words it seems so. If this is correct, then maybe reiser4 core should be updated to completely replace current VFS layer? Then it's a good point to create a branch (in old development model it would be 2.7, dunno for new :), replace VFS layer with reiser4 core, and rewrite all (or at least most used) FS as reiser4 plugins. Then everybody will be happy.
But this looks too good to be true. Perhaps I misunderstood Hans' words aboud 'new disk format', did I?
No. You can change the format the reiser4 storage tree is stored in. As long as other filesystems don't use the same underlying storage tree this is not possible.
Hello,
Quoted 5 lines · Christophe Saout
No. You can change the format the reiser4 storage tree is stored in. As long as other filesystems don't use the same underlying storage tree this is not possible.
Thank you for clarification. As I wrote, it's too good to be true.
Signature · 2 lines
With best wishes Dmitry Baryshkov
Quoted 10 lines · Christophe Saout
Am Freitag, den 27.08.2004, 00:30 +0400 schrieb Dmitry Baryshkov:
Quoted 8 lines
Another example: Can ext2/etx3/reiserfsv3/xfs be implemented as reiser4 plugins? From Hans' words it seems so. If this is correct, then maybe reiser4 core should be updated to completely replace current VFS layer? Then it's a good point to create a branch (in old development model it would be 2.7, dunno for new :), replace VFS layer with reiser4 core, and rewrite all (or at least most used) FS as reiser4 plugins. Then everybody will be happy.
Quoted 6 lines
Quoted 2 lines
But this looks too good to be true. Perhaps I misunderstood Hans' words aboud 'new disk format', did I?
No. You can change the format the reiser4 storage tree is stored in. As long as other filesystems don't use the same underlying storage tree this is not possible.
Wrong, plugin is called just below entry point from the VFS to the file-system back-end. It can use reiser4 tree, or any storage layer it wants. Or none at all: think about pseudo-files like foo/metas/uid---they are also implemnted by plugins.
Programmer dedicated enough can (besides programming Fortran in any language), write reiser4 plugin for any file-system. I will leave description of this activity to people with better command over English language.
Nikita.
Quoted 1 line
Am Freitag, den 27.08.2004, 01:33 +0400 schrieb Nikita Danilov:
Quoted 4 lines
Wrong, plugin is called just below entry point from the VFS to the file-system back-end. It can use reiser4 tree, or any storage layer it wants. Or none at all: think about pseudo-files like foo/metas/uid---they are also implemnted by plugins.
Yes. But which plugins are we talking about?
What about fs/reiser4/plugin/node/ and fs/reiser4/plugin/disk_format/?
Of course you can implement another filesystem inside the plugins but they wouldn't use fs/reiser4/*.c, so this would be rather stupid. Right?
Quoted 7 lines · Christophe Saout
Am Freitag, den 27.08.2004, 01:33 +0400 schrieb Nikita Danilov:
Quoted 4 lines
Wrong, plugin is called just below entry point from the VFS to the file-system back-end. It can use reiser4 tree, or any storage layer it wants. Or none at all: think about pseudo-files like foo/metas/uid---they are also implemnted by plugins.
Quoted 7 lines
Yes. But which plugins are we talking about?
What about
fs/reiser4/plugin/node/andfs/reiser4/plugin/disk_format/?Of course you can implement another filesystem inside the plugins but they wouldn't use
fs/reiser4/*.c, so this would be rather stupid. Right?
That was the message of my message.
Nikita.
Quoted 7 lines · Nikita Danilov
Quoted 5 lines
What about
fs/reiser4/plugin/node/andfs/reiser4/plugin/disk_format/?Of course you can implement another filesystem inside the plugins but they wouldn't use
fs/reiser4/*.c, so this would be rather stupid. Right?That was the message of my message.
And I think Christophe and me already agreed in this thread that these upper level plugin facility should go away before merge anyway. We made the mistake of not requesting removel of that one for XFS and now SGI blocks it's removal.
Quoted 18 lines · Christoph Hellwig
Quoted 9 lines · Nikita Danilov
Quoted 5 lines
What about
fs/reiser4/plugin/node/andfs/reiser4/plugin/disk_format/?Of course you can implement another filesystem inside the plugins but they wouldn't use
fs/reiser4/*.c, so this would be rather stupid. Right?That was the message of my message.
And I think Christophe and me already agreed in this thread that these upper level plugin facility should go away before merge anyway. We made the mistake of not requesting removel of that one for XFS and now SGI blocks it's removal.
Quoted 9 lines
-
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/
Your arrogance is misplaced for a man who has never done a significant piece of research.
Christoph, we are doing work, you are in the way, get out of the way.
Hans
Quoted 4 lines · Hans Reiser
Your arrogance is misplaced for a man who has never done a significant piece of research.
Christoph, we are doing work, you are in the way, get out of the way.
Could you please stop the namecalling. And if you want to check who has done significant work on Linux check the commit logs for yoour and for my shortname.
Am Donnerstag, den 26.08.2004, 01:45 -0700 schrieb Andrew Morton:
Quoted 2 lines
And describe the "plugin" system. Why does the filesystem need such a thing (other filesystems get their features via `patch -p1')?
Ok, let me try. (Hans, please don't shoot me if I don't get every detail right, I'm trying to simplify and translate)
The reiser4 core is just a big and fast storage layer using a single tree. It is bound to a mount point and uses the page cache to manage its memory. The only thing it can do on its own is to flush dirty data to the disk when the VM wants to (memory pressure) or the VFS wants to (unmount, sync) or some "plugin" wants to.
Additionally it's completely atomic (with respect to crashes, no isolation like in databases), comparable to data=journal but without the overhead of using a journal for everything.
Up to this point there are no users of this "database" and it does not implement any of the VFS methods for a filesystem (except mount and unmount perhaps).
All the functionality is provided to the plugins. You can insert, remove, lookup or modify key:object pairs (with an index into the object). The object is a sequence of units. For files a unit would be 1 byte and the index would be the byte offset. For directories the unit would be 1 entry and the index would be the filename.
Now there are some plugins that define how the storage layout on the disk is (some kind of "backend" plugins).
*And* there are plugins which are users of the "reiser4 client API" and implement the actual VFS methods.
There's a UNIX directory plugin and a UNIX file plugin.
Directories, inodes and file content are just key:object pairs and the plugins know how to operate on these.
There's a new plugin in work that also implements UNIX file semantics but stores the data for that file encrypted and/or compressed.
These plugins live between the VFS and the storage layer.
Just like the filesystems live between the VFS and the block layer (Hans would say that filesystems are VFS plugins ;-)).
Quoted 2 lines
And what are the licensing implications of plugins? Are they derived works? Must they be GPL'ed?
I suppose yes, at least currently, since they can only be linked with reiser4, there's no module infrastructure.
Quoted 9 lines · Christophe Saout
The reiser4 core is just a big and fast storage layer using a single tree. It is bound to a mount point and uses the page cache to manage its memory. The only thing it can do on its own is to flush dirty data to the disk when the VM wants to (memory pressure) or the VFS wants to (unmount, sync) or some "plugin" wants to.
Additionally it's completely atomic (with respect to crashes, no isolation like in databases), comparable to data=journal but without the overhead of using a journal for everything.
Quoted 3 lines
Up to this point there are no users of this "database" and it does not implement any of the VFS methods for a filesystem (except mount and unmount perhaps).
Now that part is interesting from the how to sell it to non-Linux users POV, but not for the linux kernel.
Quoted 11 lines
All the functionality is provided to the plugins. You can insert, remove, lookup or modify key:object pairs (with an index into the object). The object is a sequence of units. For files a unit would be 1 byte and the index would be the byte offset. For directories the unit would be 1 entry and the index would be the filename.
Now there are some plugins that define how the storage layout on the disk is (some kind of "backend" plugins).
*And* there are plugins which are users of the "reiser4 client API" and implement the actual VFS methods.
Here comes the problem. All the access checking/race avoidance/loop creation avoiced, in short the posix+extension semantics are implemented in the Linux VFS layer. If you want to allow a second access method (e.g. Hans' pet syscall) you'd have to duplicate all VFS functioanlity inside reiser4. But this is absolutely not what we want, because we moved to this common as all previous version in the different filesystems were buggy, and in fact there are problems that are simply not solveable at the level at all (rename on directories comes to mind).
So if you want to provide an additional API you'll have to go through the VFS to get it right - ergo a plugin architecture for upper plugins is worthless.
Plugins for the disk-format level are an interesting and workable idea on the other hand.
Am Donnerstag, den 26.08.2004, 14:49 +0200 schrieb Christoph Hellwig:
Quoted 2 lines
Now that part is interesting from the how to sell it to non-Linux users POV, but not for the linux kernel.
Why? The question was what these plugins are exactly. This is the answer.
Quoted 8 lines
Quoted 2 lines
*And* there are plugins which are users of the "reiser4 client API" and implement the actual VFS methods.
Here comes the problem. All the access checking/race avoidance/loop creation avoiced, in short the posix+extension semantics are implemented in the Linux VFS layer. If you want to allow a second access method (e.g. Hans' pet syscall) you'd have to duplicate all VFS functioanlity inside reiser4.
Are you actually listening? If you implement a filesystem there's a place where you have to implement the Linux VFS methods. I'm talking about inode_operations and these things. This has nothing to do with doing anything outside the Linux VFS. And I'm not talking about these metas either. These really don't belong inside the filesystem.
Quoted 3 lines
So if you want to provide an additional API you'll have to go through the VFS to get it right - ergo a plugin architecture for upper plugins is worthless.
See, you didn't listen. ;-)
The reiser4 core doesn't know about inodes, directories or files. It's the glue code between the VFS and the storage layer that does. It's implemented as a plugin. This has nothing to do with semantic enhancements yet. These should be removed for now and made a 2.7 topic.
Maybe Namesys could provide them as an additional patch from their webpage for those who need it. The plugins that would benefit from this (encrypted and compressed file storage) aren't ready yet anyway.
Quoted 7 lines · Christophe Saout
Am Donnerstag, den 26.08.2004, 14:49 +0200 schrieb Christoph Hellwig:
Quoted 2 lines
Now that part is interesting from the how to sell it to non-Linux users POV, but not for the linux kernel.
Why? The question was what these plugins are exactly. This is the answer.
I explained it below..
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
*And* there are plugins which are users of the "reiser4 client API" and implement the actual VFS methods.
Here comes the problem. All the access checking/race avoidance/loop creation avoiced, in short the posix+extension semantics are implemented in the Linux VFS layer. If you want to allow a second access method (e.g. Hans' pet syscall) you'd have to duplicate all VFS functioanlity inside reiser4.
Quoted 5 lines
Are you actually listening? If you implement a filesystem there's a place where you have to implement the Linux VFS methods. I'm talking about
inode_operationsand these things. This has nothing to do with doing anything outside the Linux VFS. And I'm not talking about these metas either. These really don't belong inside the filesystem.
as I wrote in this mail this absolutely _does_ belong in the filesystem, it's a major part of it and isn't easily separatable.
Quoted 10 lines
Quoted 3 lines
So if you want to provide an additional API you'll have to go through the VFS to get it right - ergo a plugin architecture for upper plugins is worthless.
See, you didn't listen. ;-)
The reiser4 core doesn't know about inodes, directories or files. It's the glue code between the VFS and the storage layer that does. It's implemented as a plugin. This has nothing to do with semantic enhancements yet. These should be removed for now and made a 2.7 topic.
Oh yes, it is. As soon as you use different access methods on an overlapping set of objects you see exactly the problems I described.
If they don't overlap there's no point for the plugins to start with, you'll better turn the core into a library that can be used by different projects then.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 15:07 +0200 schrieb Christoph Hellwig:
Quoted 4 lines
Quoted 2 lines
Why? The question was what these plugins are exactly. This is the answer.
I explained it below..
It's hard to talk to you if you're not even trying to understand what I'm trying to say. Andrew wanted to know what these plugins are. I tried to give an answer and then you come along to tell me that it's not relevant. Sure, Linux doesn't care about what the filesystem does internally but Andrew wanted to know that.
Quoted 8 lines
Quoted 5 lines
Are you actually listening? If you implement a filesystem there's a place where you have to implement the Linux VFS methods. I'm talking about
inode_operationsand these things. This has nothing to do with doing anything outside the Linux VFS. And I'm not talking about these metas either. These really don't belong inside the filesystem.as I wrote in this mail this absolutely _does_ belong in the filesystem, it's a major part of it and isn't easily separatable.
Huh?
Now you're completely confusing me.
First you say that that file-as-a-directory is crap then you say that it does belong into the filesystem?
I'll try again:
inode_operations, etc... are implemented as a "reiser4 plugin". This means that reiser4 is usable as filesystem, you can store files in a directory hierarchy. There's absolute nothing special here. Absolutely nothing. And yes, reiser4 plugins are invisible from the VFS. It looks like a normal filesystem because it behaves like one.
The "metas" I was referring in the second part are this file-as-a- directory thing. These don't belong in the filesystem and should therefore be removed.
The latter doesn't necessarily have anything to do with plugins. The plugins are plugins for the storage layer, not for some semantic enhancement.
Note that I changed the topic to avoid further confusion.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 5 lines · Christophe Saout
It's hard to talk to you if you're not even trying to understand what I'm trying to say. Andrew wanted to know what these plugins are. I tried to give an answer and then you come along to tell me that it's not relevant. Sure, Linux doesn't care about what the filesystem does internally but Andrew wanted to know that.
Huh? I don understand what reiser4 plugins are, and I tell you that a subset of these are _wrong_ for use in the kernel.
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Are you actually listening? If you implement a filesystem there's a place where you have to implement the Linux VFS methods. I'm talking about
inode_operationsand these things. This has nothing to do with doing anything outside the Linux VFS. And I'm not talking about these metas either. These really don't belong inside the filesystem.as I wrote in this mail this absolutely _does_ belong in the filesystem, it's a major part of it and isn't easily separatable.
Quoted 6 lines
Huh?
Now you're completely confusing me.
First you say that that file-as-a-directory is crap then you say that it does belong into the filesystem?
I think you're talking about something different then me, I'm not talking about the magic meta files but the VFS interface in general.
This VFS interface is an integral part of ævery filesystem, and it doesn't make a whole lot to put it into a plugin. If you want your filesystem core portable it does to a certain extent make sense to abstract them out, but as someone who's worked on a few such 'portable' filesystems I can tell you that it doesn't work out as expected.
Quoted 7 lines
I'll try again:
inode_operations, etc... are implemented as a "reiser4 plugin". This means that reiser4 is usable as filesystem, you can store files in a directory hierarchy. There's absolute nothing special here. Absolutely nothing. And yes, reiser4 plugins are invisible from the VFS. It looks like a normal filesystem because it behaves like one.
Now kill the whole plugin mess and let them talk directly to another. My first mail explained to you why it doesn't make sense to have multiple such plugins to work on a common subset of data.
Quoted 3 lines
The latter doesn't necessarily have anything to do with plugins. The plugins are plugins for the storage layer, not for some semantic enhancement.
Again plugins below the pagecache (if that's what you call the "storage layer") _do_ make sense. plugins at the semantic layer don't.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 15:24 +0200 schrieb Christoph Hellwig:
Quoted 8 lines
Quoted 2 lines
First you say that that file-as-a-directory is crap then you say that it does belong into the filesystem?
I think you're talking about something different then me, I'm not talking about the magic meta files but the VFS interface in general.
This VFS interface is an integral part of very filesystem, and it doesn't make a whole lot to put it into a plugin.
Right. That's why these plugins are linked in uncoditionally. It doesn't work without them. Hence "plugins" is not a very good name.
Quoted 4 lines
If you want your
filesystem core portable it does to a certain extent make sense to abstract them out, but as someone who's worked on a few such 'portable' filesystems I can tell you that it doesn't work out as expected.
That's your opinion. reiser4 seems to work very well.
Quoted 1 line
Now kill the whole plugin mess and let them talk directly to another.
This is how reiserfs v3 did it. And Hans says that it actually complicated things.
Quoted 2 lines
My first mail explained to you why it doesn't make sense to have multiple such plugins to work on a common subset of data.
What I understood is that you can select exactly one plugin that e.g. handles the file data. The default plugin is optimized for normal files, another one could implement transparent compression or encryption. Some of these plugins also give the storage layer hints how to group files together to optimized performance. Neither of these things mess with the VFS.
Quoted 6 lines
Quoted 3 lines
The latter doesn't necessarily have anything to do with plugins. The plugins are plugins for the storage layer, not for some semantic enhancement.
Again plugins below the pagecache (if that's what you call the "storage layer") _do_ make sense. plugins at the semantic layer don't.
Yes, that's what I was trying to say.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 6 lines · Christophe Saout
Quoted 4 lines
If you want your
filesystem core portable it does to a certain extent make sense to abstract them out, but as someone who's worked on a few such 'portable' filesystems I can tell you that it doesn't work out as expected.That's your opinion. reiser4 seems to work very well.
So how many OSes is it ported to currently? The problem is not that it doesn't work but that it's really hard to maintain. And remember that this maintaince overhead is not just for Hans but for everyone that does VFS-level work. Unless of course we get a blanko permission to break it as soon as fixing the mess becomes non-trivial.
Quoted 6 lines
What I understood is that you can select exactly one plugin that e.g. handles the file data. The default plugin is optimized for normal files, another one could implement transparent compression or encryption. Some of these plugins also give the storage layer hints how to group files together to optimized performance. Neither of these things mess with the VFS.
compression or encryption must sit below the pagecache to work nicely, and this hint things that usually sit at the pagecache level. But let's assume you have a valid use for different file_operations, why don't you simply add in different file_operations instead of adding another internal dispatch layer?
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 15:40 +0200 schrieb Christoph Hellwig:
Quoted 6 lines
Quoted 1 line
That's your opinion. reiser4 seems to work very well.
So how many OSes is it ported to currently? The problem is not that it doesn't work but that it's really hard to maintain. And remember that this maintaince overhead is not just for Hans but for everyone that does VFS-level work.
Where does it add overhead? It's just the interface between the reiser4 storage layer and the rest abstracted out.
Ok, there's the code that dispatches the VFS method calls to the plugin call but I would say that's about it. I didn't develop reiser4 so I don't know.
/* ->mkdir() VFS method in reiser4 inode_operations */ static int
reiser4_mkdir(struct inode *parent /* inode of parent
* directory */ ,
struct dentry *dentry /* dentry of new object to
* create */ ,
int mode /* new object's mode */ )
{
reiser4_object_create_data data;
reiser4_stat_inc_at(parent->i_sb, vfs_calls.mkdir);
data.mode = S_IFDIR | mode;
data.id = DIRECTORY_FILE_PLUGIN_ID;
return invoke_create_method(parent, dentry, &data);
}The invoke_create_method then just calls the create method of the plugin after setting up a context and lookup up the plugin.
xfs_iops.c seems to do something similar.
Quoted 2 lines
Unless of course we get a blanko permission to break it
as soon as fixing the mess becomes non-trivial.
Well, I think so. It's done relatively often.
Quoted 7 lines
Quoted 6 lines
What I understood is that you can select exactly one plugin that e.g. handles the file data. The default plugin is optimized for normal files, another one could implement transparent compression or encryption. Some of these plugins also give the storage layer hints how to group files together to optimized performance. Neither of these things mess with the VFS.
Quoted 5 lines
compression or encryption must sit below the pagecache to work nicely, and this hint things that usually sit at the pagecache level. But let's assume you have a valid use for different
file_operations, why don't you simply add in differentfile_operationsinstead of adding another internal dispatch layer?
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 9 lines
Quoted 5 lines
compression or encryption must sit below the pagecache to work nicely, and this hint things that usually sit at the pagecache level. But let's assume you have a valid use for different
file_operations, why don't you simply add in differentfile_operationsinstead of adding another internal dispatch layer?I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
The VFS shouldn't, that the whole point. That's why it allows the filesystem to register different method tables for each object.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 17:37 +0200 schrieb Christoph Hellwig:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
compression or encryption must sit below the pagecache to work nicely, and this hint things that usually sit at the pagecache level. But let's assume you have a valid use for different
file_operations, why don't you simply add in differentfile_operationsinstead of adding another internal dispatch layer?
Quoted 6 lines
Quoted 3 lines
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
The VFS shouldn't, that the whole point. That's why it allows the filesystem to register different method tables for each object.
Only the objects it can distinguish.
Quoted 5 lines
ops->file = reiser4_file_operations;
ops->symlink = reiser4_symlink_inode_operations;
ops->special = reiser4_special_inode_operations;
ops->dentry = reiser4_dentry_operations;
ops->as = reiser4_as_operations;How could reiser4 register other operations for files that should be stored encrypted or compressed? It's all under reiser4_file_operations.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 8 lines · Christophe Saout
Quoted 6 lines
Quoted 3 lines
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
The VFS shouldn't, that the whole point. That's why it allows the filesystem to register different method tables for each object.
Only the objects it can distinguish.
Yes, every inode can have different operation vectors. Which is the smallest possible object the VFS knows about.
Quoted 8 lines
Quoted 5 lines
ops->file = reiser4_file_operations; ops->symlink = reiser4_symlink_inode_operations; ops->special = reiser4_special_inode_operations; ops->dentry = reiser4_dentry_operations; ops->as = reiser4_as_operations;How could reiser4 register other operations for files that should be stored encrypted or compressed? It's all under
reiser4_file_operations.
Again, your confusing upper and lower plugins. For things happening below the pagecache you could register different address_space operations which sometimes makes sense. But you want e.g. different inode_operations for directories vs symlinks vs files.
Please read through some linux filesystem code, okay :)
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 18:06 +0200 schrieb Christoph Hellwig:
Quoted 4 lines
Again, your confusing upper and lower plugins. For things happening below the pagecache you could register different
address_spaceoperations which sometimes makes sense. But you want e.g. differentinode_operationsfor directories vs symlinks vs files.
Ok, I see your point. aops. Sorry.
Looking at the code this could be done. The wrappers that dispatch the operations are really small and call the plugin that is registered with the inode of the mapping. Instead it could have directly set the corresponding operations. Right. The wrappers are doing a few things before calling the plugin. That could be done the other way round too. But that's more of an implementation issue and could still be changed.
Quoted 1 line
Please read through some linux filesystem code, okay :)
I'm partly familiar with that, I just either misunderstood you or wasn't really thinking (probably the latter...).
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 7 lines · Christophe Saout
Ok, I see your point. aops. Sorry.
Looking at the code this could be done. The wrappers that dispatch the operations are really small and call the plugin that is registered with the inode of the mapping. Instead it could have directly set the corresponding operations. Right. The wrappers are doing a few things before calling the plugin. That could be done the other way round too. But that's more of an implementation issue and could still be changed.
I agree that it's an implementation issue. But it's also a good proof for how Hans tries to ignore all the existing infrastructure for various reasons.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Am Donnerstag, den 26.08.2004, 17:25 +0100 schrieb Christoph Hellwig:
Quoted 10 lines
Quoted 6 lines
Looking at the code this could be done. The wrappers that dispatch the operations are really small and call the plugin that is registered with the inode of the mapping. Instead it could have directly set the corresponding operations. Right. The wrappers are doing a few things before calling the plugin. That could be done the other way round too. But that's more of an implementation issue and could still be changed.
I agree that it's an implementation issue. But it's also a good proof for how Hans tries to ignore all the existing infrastructure for various reasons.
I definitely agree with you on that one.
It bugged me from the beginning because things like these are very likely to suffer from unnecessary problems that have been solved in the common code or might be solved when correctly done in the common code in the future.
Re: reiser4 plugins
In reply to Christophe SaoutQuoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Re: reiser4 plugins
Quoted 10 lines · Hans Reiser
Quoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Quoted 4 lines
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off? People on #reiser4 report 90 _second_ stalls with reiser4 under high io loads (large atom is obviously being flushed and everyone waits on it...). In my opinion, it is such things that are of utmost importance for real reiser4 acceptance, not how to name `metas' sub-directory.
Nikita.
Re: reiser4 plugins
Quoted 24 lines · Nikita Danilov
Quoted 10 lines · Hans Reiser
Quoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Quoted 3 lines
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off? People on #reiser4 report 90 _second_ stalls with reiser4 under high io loads (large atom is obviously being flushed and everyone waits on it...). In my opinion, it is such things that are of utmost importance for real reiser4 acceptance, not how to name `metas' sub-directory.
Quoted 5 lines
Nikita.
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if you want, but then you should run your own and publish it.
There are still plenty of things needing fixing though, and you are right that they are more important than the pretext being attempted for keeping us out of the kernel. Probably you could supply them with many superior pretexts.;-)
The 90 second stalls, those should be fixed by debugging copy on capture and turning it on, yes? You can hardly claim I failed to push for the completion of copy on capture.... and of course the reason it is not done is simply that there is too much to do.... I (sincerely) hope vs enjoys his vacation, the whole team is working too hard. I am doing 7 day weeks now to try to make payroll for us and keep darpa happy at the same time.
fsync performance needs fixing badly, and Chris is right in his diagnosis of what we can do to fix it.
Hans
Re: reiser4 plugins
Quoted 27 lines · Hans Reiser
Quoted 25 lines · Nikita Danilov
Quoted 10 lines · Hans Reiser
Quoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Quoted 4 lines
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off? People on #reiser4 report 90 _second_ stalls with reiser4 under high io loads (large atom is obviously being flushed and everyone waits on it...). In my opinion, it is such things that are of utmost importance for real reiser4 acceptance, not how to name `metas' sub-directory.
Quoted 7 lines
Quoted 5 lines
Nikita.
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if
They experience 90 second stalls. And please, do not tell me how fast reiser4 is, I spent a lot of time working with it, and I know very well when it's fast, and when it's deadly slow.
Quoted 1 line
you want, but then you should run your own and publish it.
I did, after which you told me to turn OVERWRITE and MODIFY phases off, beause performance was horrible.
I not criticizing mongo benchmark per se. I think that it is fundamentally wrong to use results that were deliberatly manipulated to get best appearance to reiser4 (by omitting work-loads where it performs poorly) as an argument. It's not clear who will, according to your colorful expression, `eat dust' as a result of this. Or do you think that users never overwrite of modify files in real life?
Quoted 2 lines
The 90 second stalls, those should be fixed by debugging copy on capture and turning it on, yes? You can hardly claim I failed to push for the
No. I described so many times to you, why COC is ineffectual here.
Quoted 1 line
Hans
Nikita.
Re: reiser4 plugins
Quoted 5 lines · Nikita Danilov
Quoted 4 lines
Quoted 4 lines
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off?
What I should have done was what I did with fsync performance. With fsync performance I told people that we had not yet tuned for it, please wait a bit and we will tune for it, for now it sucks.
Instead what I did was discuss with Zam at the time how it could be fixed, leave it off the website until Zam was given a chance to fix it, and then I managed to forget about it. After release one remembers what all the things that should have been fixed before release were, sigh.
Zam and I both know what is needed to fix performance in these phases, and I just spoke with him on the phone. I imagine it is 2 weeks of work for him, but it could be up to 6 weeks. He will comment later.
The fix should consist of the following:
1) tweak the relocation policies (zam will say more about this, as he is the maintainer of them)
2) optimize overwrite set so that in the modify phase we behave like a write twice journaling filesystem, which means implement a reserved for the journal only area that exists as long as plenty of disk space is free.
3) finish the repacker (but we won't do that this month....)
The modify phase, which picks a random block to modify, is a worst case for a wandering log without a repacker. We could actually do very very well at that kind of activity with a repacker, probably better than a fixed journal, but for now we should try acting like a write twice journal for atoms that small.
So, having realized my error thanks to the gracious kindness of how you pointed it out, we will modify the web site to say that we are not yet tuned for and currently suck at modifying random blocks in the middle of files, and appending small amounts to the end of them, and overwriting small files, but that we think we know what is needed to fix those things.
I think your characterization of my reasons was unkind and also unfair. I will pass on saying similarly unkind things about you as you are mostly a good person. You never did seem to understand me. You didn't understand the reasons for my technical designs (when they worked it made no sense to you that they did), and you didn't understand me as a person.
I wish you well in your new job, and thank you for the hard work you did for me.
Hans
Re: reiser4 plugins
Quoted 10 lines · Hans Reiser
Quoted 5 lines · Nikita Danilov
Quoted 4 lines
Quoted 4 lines
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off?
What I should have done was what I did with fsync performance. With fsync performance I told people that we had not yet tuned for it, please wait a bit and we will tune for it, for now it sucks.
Right, and instead of this you are now claiming that these benchmarks' show superior reiser4 performance. Moreover, you are doing this aggressively and proposing other people to eat the dust' over what happened to only exist due to your failing to remember something. As some other notable LKML poster put it `inform yourself before posting'. :-)
Quoted 3 lines
Instead what I did was discuss with Zam at the time how it could be fixed, leave it off the website until Zam was given a chance to fix it,
It wasn't Zam. It was me to begin with. OVERWRITE and MODIFY phases were turned off after switching to large keys.
Quoted 3 lines
and then I managed to forget about it. After release one remembers
what all the things that should have been fixed before release were, sigh.
[...]
Quoted 2 lines
I think your characterization of my reasons was unkind and also unfair.
What fairness and kindness one expects after styling others as `puppies' in public, and commenting on their hair style in purportedly technical argument?
[...]
Quoted 2 lines
Hans
Nikita.
Re: reiser4 plugins
Quoted 4 lines
I wish you well in your new job, and thank you for the hard work you did for me.
Hans
Oh yeah , Nikita , had to say this : BUT thank you for that hard work you did for us all.
It seems it is 'bout time to move out of the company, producing public software, where leader of the project thanks participants for the work done with words "for me" at the end.
Always had my doubts that I should thanks Hans Reiser for the FS :) And the facts are that my servers for now get ext3.
Good Day in New York !
--Sincerely.
Quoted 41 lines · Nikita Danilov
Quoted 9 lines · Hans Reiser
Quoted 4 lines · Nikita Danilov
Quoted 4 lines
Quoted 4 lines
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off?
What I should have done was what I did with fsync performance. With fsync performance I told people that we had not yet tuned for it, please wait a bit and we will tune for it, for now it sucks.
Right, and instead of this you are now claiming that these
benchmarks' show superior reiser4 performance. Moreover, you are doing this aggressively and proposing other people toeat the dust' over what happened to only exist due to your failing to remember something. As some other notable LKML poster put it `inform yourself before posting'. :-)Quoted 2 lines
Instead what I did was discuss with Zam at the time how it could be fixed, leave it off the website until Zam was given a chance to fix it,
It wasn't Zam. It was me to begin with. OVERWRITE and MODIFY phases were turned off after switching to large keys.
Quoted 3 lines
and then I managed to forget about it. After release one remembers
what all the things that should have been fixed before release were, sigh.[...]
Quoted 1 line
I think your characterization of my reasons was unkind and also unfair.
What fairness and kindness one expects after styling others as `puppies' in public, and commenting on their hair style in purportedly technical argument?
[...]
Quoted 1 line
Hans
Nikita.
Re: reiser4 plugins
Quoted 10 lines · Konstantin Besch
Quoted 9 lines
I wish you well in your new job, and thank you for the hard work you did for me.
Hans
Quoted 10 lines
Oh yeah , Nikita , had to say this : BUT thank you for that hard work you did
for us all. It seems it is 'bout time to move out of the company, producing public software, where leader of the project thanks participants for the work done with words "for me" at the end.Always had my doubts that I should thanks Hans Reiser for the FS :) And the facts are that my servers for now get ext3. Good Day in New York !
--Sincerely.
I paid his salary with my credit cards. Under usual english rules and capitalist traditions, that means that saying that he was working for me is socially acceptable english, even if I understood that he worked for more than the money.
Hans
Re: reiser4 plugins
In reply to Nikita DanilovQuoted 8 lines · Nikita Danilov
Quoted 2 lines
Instead what I did was discuss with Zam at the time how it could be fixed, leave it off the website until Zam was given a chance to fix it,
It wasn't Zam. It was me to begin with. OVERWRITE and MODIFY phases were turned off after switching to large keys.
The online repacker is the best technical fix for these problems. Tight packing is generally more damaged in its layout by small changes than loose packing, and V4 is the ultimate tight packer. It is not clear to me that making V4 pack more loosely is necessarily a good idea. These phases disturb the original packing at flush time, and the other phases don't. One solution to try is packing less tightly. Maybe once every megabyte skip forward 1 megabyte, and once every 64 megabytes skip to a random disk location, when allocating large new atoms. I think I prefer using a repacker, but we should try it and see. The other solutions of the previous email should also help a lot. The issues of layout in this are similar to the ones improved by the fibration plugin.
I remember talking with not just you but zam about how we could fix it, and there was too much in the queue of work, and everyone was complaining to me that we should be debugging not optimizing, and you were the only one who thought it was a big deal. I guess you still think it is a big issue and I still think things are good enough to use without it. I still think Zam understood the issues better than you did (allocation is his code not yours).
There are some layout optimizations that a repacker can do best. Still, there are some rough spots in the current allocation policy, and we should look at it.
Probably you will have reason to howl if we setup a benchmark which disturbs things with these phases, runs the repacker (I hope to have one in 6 months), and then measures our read performance compared to other filesystems without a repacker....;-)
Hans
Re: reiser4 plugins
Hans Reiser writes:
[...]
Quoted 5 lines
I remember talking with not just you but zam about how we could fix it, and there was too much in the queue of work, and everyone was complaining to me that we should be debugging not optimizing, and you were the only one who thought it was a big deal. I guess you still
You are trying to evade the point. And the point is not how performance in these phases (and their impact on other phases) can be improved, or what excuses did you have for not `doing' it, but the fact that after it was found that large keys behave badly, these phases were turned off, others were switched to lexicographical operation, _and_ resulting benchmark is used as a basis to call other people names.
Quoted 9 lines
think it is a big issue and I still think things are good enough to use without it. I still think Zam understood the issues better than you did (allocation is his code not yours).
There are some layout optimizations that a repacker can do best. Still, there are some rough spots in the current allocation policy, and we should look at it.
Probably you will have reason to howl if we setup a benchmark which
Surely, as a `big dog' what other sounds can I produce? :)
Quoted 3 lines
disturbs things with these phases, runs the repacker (I hope to have one in 6 months), and then measures our read performance compared to other filesystems without a repacker....;-)
That's ok with me, but it would make sense to remove unfair benchmarks from the site until then.
Quoted 2 lines
Hans
Nikita.
Re: reiser4 plugins
In reply to Nikita DanilovQuoted 36 lines · Nikita Danilov
Quoted 27 lines · Hans Reiser
Quoted 25 lines · Nikita Danilov
Quoted 10 lines · Hans Reiser
Quoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Quoted 4 lines
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off? People on #reiser4 report 90 _second_ stalls with reiser4 under high io loads (large atom is obviously being flushed and everyone waits on it...). In my opinion, it is such things that are of utmost importance for real reiser4 acceptance, not how to name `metas' sub-directory.
Quoted 7 lines
Quoted 5 lines
Nikita.
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if
Quoted 8 lines
They experience 90 second stalls. And please, do not tell me how fast reiser4 is, I spent a lot of time working with it, and I know very well when it's fast, and when it's deadly slow.
Quoted 1 line
you want, but then you should run your own and publish it.
I did, after which you told me to turn OVERWRITE and MODIFY phases off, beause performance was horrible.
Hmm, I think not the modify/overwrite phases performance were the problem. The modify and overwrite mongo phases fragment the filesystem too much, it had a bad effect visible in the read phase and even in delete phase.
We measured/optimized read performance in assumption that fs is not fragmented, why we should measure bad effect of overwrite instead?
other fs do not relocate already allocated blocks, negative effect of file set overwrite is zero for them. We could do the same for reiser4 by tuning flush algorithm and journal blocks allocation.
If users want to see read and delete performance as they are, overwrite phase should be excluded, at least until we teach flush algorithm to not break good block allocation.
If one wants to measure overwite performance, it is easy to enable overwrite phase in mongo, but read and delete speed will be affected (it was so when I tried to optimize delete).
Quoted 7 lines
I not criticizing mongo benchmark per se. I think that it is fundamentally wrong to use results that were deliberatly manipulated to get best appearance to reiser4 (by omitting work-loads where it performs poorly) as an argument. It's not clear who will, according to your colorful expression, `eat dust' as a result of this.
Or do you think
that users never overwrite of modify files in real life?
not whole file set. I mean it is unusual to overwrite all files in the fs.
Quoted 4 lines
Quoted 2 lines
The 90 second stalls, those should be fixed by debugging copy on capture and turning it on, yes? You can hardly claim I failed to push for the
No. I described so many times to you, why COC is ineffectual here.
There are other ideas :) but, it seems to me, if we will focus on benchmarks, we never complete plugins, metafiles and other useful things. What I want from reiser4 is a possiblity to encrypt and compress ~/Mail/ :).
Quoted 4 lines
Quoted 2 lines
Hans
Nikita.
Signature · 1 line
Alex.
Re: reiser4 plugins
In reply to Hans ReiserQuoted 5 lines · Hans Reiser
Quoted 1 line
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if you want, but then you should run your own and publish it.
As a "real" desktop user who just converted all his partitions from ext3 to reiser4, I have not, as yet, noticed any startling performance increase. Being slightly slightly irked to hear that the benchmark numbers that have been paraded around on Slashdot and the internet in general, at ext3's expense, have had reiser4's "bad" results surgically extracted, I am running my own benchmarks to get the real story on reiser4/ext3 mongo performance on my, rather average, desktop hardware.
I am using the latest Mongo on FC/rawhide and the 2.6.8.1-mm4 kernel.
Unfortunately, I get an error from mongo.pl that "Done" is not a numeric argument at line 439.
I have done this to fix it:
mongo_fixed.pl 2004-08-27 17:06:51.369306735 -0500 renamed from mongo.pl 2004-08-27 17:07:01.681723313 -0500 +2 -2
@@ -429,8 +429,8 @@ if ( -e ${ERR_FILE}) { &DIE ("\nEXITED WITH FAIL\n"); } - my $real = (split ' ', $time_output[0])[1]; - my $cpu = (split ' ', $time_output[2])[1]; + my $real = (split ' ', $time_output[1])[1]; + my $cpu = (split ' ', $time_output[3])[1]; unless ( $real =~ /\s*\d+/ && $cpu =~ /\s*\d+/) { LOG "@time_output";
What it gets me is the "real" line of the "time" output for "STAT REAL_TIME" and the "sys" line of the "time" output for "STAT CPU_TIME". i.e. only system time is counted. I believe this was the intent of the original code, but want to verify before continuing.
Thanks,
Steve Bergman
Re: reiser4 plugins
Quoted 40 lines · Steve Bergman
Quoted 4 lines · Hans Reiser
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if you want, but then you should run your own and publish it.
As a "real" desktop user who just converted all his partitions from ext3 to reiser4, I have not, as yet, noticed any startling performance increase. Being slightly slightly irked to hear that the benchmark numbers that have been paraded around on Slashdot and the internet in general, at ext3's expense, have had reiser4's "bad" results surgically extracted, I am running my own benchmarks to get the real story on reiser4/ext3 mongo performance on my, rather average, desktop hardware.
I am using the latest Mongo on FC/rawhide and the 2.6.8.1-mm4 kernel.
Unfortunately, I get an error from mongo.pl that "Done" is not a numeric argument at line 439.
I have done this to fix it:
mongo_fixed.pl 2004-08-27 17:06:51.369306735 -0500 renamed from mongo.pl 2004-08-27 17:07:01.681723313 -0500 +2
-2@@ -429,8 +429,8 @@ if ( -e ${ERR_FILE}) { &DIE ("\nEXITED WITH FAIL\n"); } - my $real = (split ' ', $time_output[0])[1]; - my $cpu = (split ' ', $time_output[2])[1]; + my $real = (split ' ', $time_output[1])[1]; + my $cpu = (split ' ', $time_output[3])[1]; unless ( $real =~ /\s*\d+/ && $cpu =~ /\s*\d+/) { LOG "@time_output";
Quoted 12 lines
What it gets me is the "real" line of the "time" output for "STAT
REAL_TIME" and the "sys" line of the "time" output for "STATCPU_TIME". i.e. only system time is counted. I believe this was the intent of the original code, but want to verify before continuing.Thanks,
Steve Bergman
I didn't write this (more precisely, it only vaguely resembles what I wrote in 1996). Are you saying that it reports system time as real time? If yes, then it is an error, we need to go remove a bunch of numbers from our benchmarks, and thanks for finding it.
Zam, please comment.
Hans
Re: reiser4 plugins
Quoted 8 lines · Hans Reiser
Quoted 1 line
I didn't write this (more precisely, it only vaguely resembles what I wrote in 1996). Are you saying that it reports system time as real time? If yes, then it is an error, we need to go remove a bunch of numbers from our benchmarks, and thanks for finding it.
Zam, please comment.
No. I'm saying that on my setup (kernel 2.6.8.1-mm4/perl 5.8.5/bash 3.00) the first line returned from running the test is the:
[1]+ Done ...
line which throws the array indexes off by 1 and I always get 0 for the real time and, yes, the real time gets reported as the system time, I think. Plus I get a warning about the fact that "Done" is not numeric. This is obviously a problem with my particular setup.
After bumping the indexes up by 1, I get the correct real time reported as "STAT REAL_TIME". And the system time is reported as "STAT CPU_TIME".
"STAT CPU_UTIL", however is computed in a completely different way based on numbers collected from /proc/stat. If I'm, reading linux/Documentation/filesystems/proc.txt correctly, it is trying to return the (system time) / (total time). The total time agrees with "STAT REAL_TIME". However, the (system time) that it comes up with here is always considerably higher than "STAT CPU_TIME".
User error is quite possible, as I am:
1. Just getting to know mongo.
2. Not a perl guy.
3. There is obviously something mongo.pl doesn't like about my setup.
-Steve Bergman
P.S. In the 2 tests I've run, reiser4 is not doing all that badly against ext3 in OVERWRITE and MODIFY, though ext3 does come in faster. Reiser4 trails badly on APPEND however, ext3 (data=ordered, without htree) being some 2.5 - 4 times faster.
Re: reiser4 plugins
Quoted 13 lines · Steve Bergman
Quoted 8 lines · Hans Reiser
Quoted 1 line
I didn't write this (more precisely, it only vaguely resembles what I wrote in 1996). Are you saying that it reports system time as real time? If yes, then it is an error, we need to go remove a bunch of numbers from our benchmarks, and thanks for finding it.
Zam, please comment.
No. I'm saying that on my setup (kernel 2.6.8.1-mm4/perl 5.8.5/bash 3.00) the first line returned from running the test is the:
Quoted 6 lines
[1]+ Done ...
line which throws the array indexes off by 1 and I always get 0 for the real time and, yes, the real time gets reported as the system time, I think. Plus I get a warning about the fact that "Done" is not numeric. This is obviously a problem with my particular setup.
Yes. but that real/sys time parsing isn't reliable.
Quoted 10 lines
After bumping the indexes up by 1, I get the correct real time reported as "STAT
REAL_TIME". And the system time is reported as "STATCPU_TIME"."STAT
CPU_UTIL", however is computed in a completely different way based on numbers collected from/proc/stat. If I'm, readinglinux/Documentation/filesystems/proc.txtcorrectly, it is trying to return the (system time) / (total time). The total time agrees with "STATREAL_TIME". However, the (system time) that it comes up with here is always considerably higher than "STATCPU_TIME".
CPU_UTIL counts other background processes too. The foreground process may just wait
when all work is done by pdflush. I think CPU_UTIL is more useful than CPU_TIME.
Quoted 5 lines
User error is quite possible, as I am:
1. Just getting to know mongo.
2. Not a perl guy.
i don't like perl too much, but seems Perl is perfect for the things you just did (the fixes).
Quoted 8 lines
3. There is obviously something mongo.pl doesn't like about my setup.
-Steve Bergman
P.S. In the 2 tests I've run, reiser4 is not doing all that badly against ext3 in OVERWRITE and MODIFY, though ext3 does come in faster. Reiser4 trails badly on APPEND however, ext3 (data=ordered, without htree) being some 2.5 - 4 times faster.
Signature · 1 line
Alex.
Re: reiser4 plugins
In reply to Steve BergmanQuoted 13 lines · Steve Bergman
Quoted 8 lines · Hans Reiser
Quoted 1 line
I didn't write this (more precisely, it only vaguely resembles what I wrote in 1996). Are you saying that it reports system time as real time? If yes, then it is an error, we need to go remove a bunch of numbers from our benchmarks, and thanks for finding it.
Zam, please comment.
No. I'm saying that on my setup (kernel 2.6.8.1-mm4/perl 5.8.5/bash 3.00) the first line returned from running the test is the:
Quoted 6 lines
[1]+ Done ...
line which throws the array indexes off by 1 and I always get 0 for the real time and, yes, the real time gets reported as the system time, I think. Plus I get a warning about the fact that "Done" is not numeric. This is obviously a problem with my particular setup.
Yes. but that real/sys time parsing isn't reliable.
Quoted 10 lines
After bumping the indexes up by 1, I get the correct real time reported as "STAT
REAL_TIME". And the system time is reported as "STATCPU_TIME"."STAT
CPU_UTIL", however is computed in a completely different way based on numbers collected from/proc/stat. If I'm, readinglinux/Documentation/filesystems/proc.txtcorrectly, it is trying to return the (system time) / (total time). The total time agrees with "STATREAL_TIME". However, the (system time) that it comes up with here is always considerably higher than "STATCPU_TIME".
CPU_UTIL counts other background processes too. The foreground process may just wait
when all work is done by pdflush. I think CPU_UTIL is more useful than CPU_TIME.
Quoted 5 lines
User error is quite possible, as I am:
1. Just getting to know mongo.
2. Not a perl guy.
i don't like perl too much, but seems Perl is perfect for the things you just did (the fixes).
Quoted 8 lines
3. There is obviously something mongo.pl doesn't like about my setup.
-Steve Bergman
P.S. In the 2 tests I've run, reiser4 is not doing all that badly against ext3 in OVERWRITE and MODIFY, though ext3 does come in faster. Reiser4 trails badly on APPEND however, ext3 (data=ordered, without htree) being some 2.5 - 4 times faster.
Signature · 1 line
Alex.
Re: reiser4 plugins
In reply to Steve BergmanQuoted 39 lines · Steve Bergman
Quoted 5 lines · Hans Reiser
Quoted 1 line
If you ask real users, they say that reiser4 is fast, and their experience matches our benchmark. You can criticize the benchmark if you want, but then you should run your own and publish it.
As a "real" desktop user who just converted all his partitions from ext3 to reiser4, I have not, as yet, noticed any startling performance increase. Being slightly slightly irked to hear that the benchmark numbers that have been paraded around on Slashdot and the internet in general, at ext3's expense, have had reiser4's "bad" results surgically extracted, I am running my own benchmarks to get the real story on reiser4/ext3 mongo performance on my, rather average, desktop hardware.
I am using the latest Mongo on FC/rawhide and the 2.6.8.1-mm4 kernel.
Unfortunately, I get an error from mongo.pl that "Done" is not a numeric argument at line 439.
I have done this to fix it:
mongo_fixed.pl 2004-08-27 17:06:51.369306735 -0500 renamed from mongo.pl 2004-08-27 17:07:01.681723313 -0500 +2
-2@@ -429,8 +429,8 @@ if ( -e ${ERR_FILE}) { &DIE ("\nEXITED WITH FAIL\n"); } - my $real = (split ' ', $time_output[0])[1]; - my $cpu = (split ' ', $time_output[2])[1]; + my $real = (split ' ', $time_output[1])[1]; + my $cpu = (split ' ', $time_output[3])[1]; unless ( $real =~ /\s*\d+/ && $cpu =~ /\s*\d+/) { LOG "@time_output";
Quoted 4 lines
What it gets me is the "real" line of the "time" output for "STAT
REAL_TIME" and the "sys" line of the "time" output for "STATCPU_TIME". i.e. only system time is counted. I believe this was the intent of the original code, but want to verify before continuing.
it works on our test servers which are SuSE9.0/9.1.
I think there is a dependency on system utilities, "Done" is not printed by mongo.pl or any other program from the mongo package.
It would be nice to tell us what linux distro you are using and what mongo phase fails.
Quoted 2 lines
Thanks,
Steve Bergman
Thanks.
Signature · 1 line
Alex.
Re: reiser4 plugins
In reply to Nikita DanilovQuoted 16 lines · Nikita Danilov
Quoted 10 lines · Hans Reiser
Quoted 8 lines · Christophe Saout
I don't know, ask Hans. How could the VFS know it a filesystem wants to do something specific with a file that is completely transparent to the VFS?
Quoted 4 lines
To know what method to use, you must determine the pluginid, and then find the method within that plugin for that vfs operation.
As for overhead, well, who eats whose dust in the benchmarks....?
Quoted 8 lines
Whoever sponsors the benchmark usually wins. Had you forgotten that mongo setup used by http://www.namesys.com/benchmarks.html was specially `tuned' to reach peak reiser4 performance? Remember why you decided to turn OVERWRITE and MODIFY phases off? People on #reiser4 report 90 _second_ stalls with reiser4 under high io loads (large atom is obviously being flushed and everyone waits on it...). In my opinion, it is such things that are of utmost importance for real reiser4 acceptance, not how to name `metas' sub-directory.
i am operating alot under heavy loads, often alot compiling, seti and some other applications, and i must say, i never noticed this
Quoted 3 lines
Nikita.
Signature · 1 line
Redeeman <[email protected]>
Re: reiser4 plugins
In reply to Christoph HellwigQuoted 4 lines · Christoph Hellwig
The problem is not that it
doesn't work but that it's really hard to maintain.
You really like to talk about what you know nothing of, yes?
Reiser4 is FAR easier to maintain than V3. Ask anyone on reiserfs-dev. It was designed to reduce our software maintenance costs.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Christophe SaoutQuoted 1 line · Christophe Saout
That's your opinion. reiser4 seems to work very well.
Have you tried /bin/cp, or a backup+restore ?
What happened to your file streams ?
Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 7 lines · Rik van Riel
Quoted 1 line · Christophe Saout
That's your opinion. reiser4 seems to work very well.
Have you tried
/bin/cp, or a backup+restore ?What happened to your file streams ?
Shrug, backup programs can be fixed. The fact that we couldn't backup 16GB files before O_LARGEFILE wasn't a reason not to do it.
IMHO it's more important to ask the question 'is this important for linux' and then we can figure out how to make it work.
-chris
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Rik van RielAm Donnerstag, den 26.08.2004, 09:52 -0400 schrieb Rik van Riel:
Quoted 5 lines
Quoted 1 line
That's your opinion. reiser4 seems to work very well.
Have you tried
/bin/cp, or a backup+restore ?What happened to your file streams ?
1. I wasn't talking about reiser4 plugins, not about the file-as-a-directory thing or file streams
2. reiser4 doesn't currently have those
3. I don't really like file streams
:-)
But I'm using ACLs on a server and had to forward-port an rsync patch to make full backups using rsync possible. That's not really better.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Christophe SaoutQuoted 5 lines · Christophe Saout
Am Donnerstag, den 26.08.2004, 15:24 +0200 schrieb Christoph Hellwig:
Quoted 3 lines
Quoted 2 lines
First you say that that file-as-a-directory is crap then you say that it does belong into the filesystem?
Quoted 8 lines
Quoted 5 lines
I think you're talking about something different then me, I'm not talking about the magic meta files but the VFS interface in general.
This VFS interface is an integral part of very filesystem, and it doesn't make a whole lot to put it into a plugin.
Right. That's why these plugins are linked in uncoditionally. It doesn't work without them. Hence "plugins" is not a very good name.
its still plugins no matter what. they just emulate "conventional filesystem" behavior for VFS, but at some point you might want just to scrap VFS.. if you'd like to.
And I honestly dont understand whats the other Christoph's worries are about.
Its got perfomance. Its there. It can emulate "conventional filesystem" behaviour,
for legacy apps. Thouse two that are currently crippled by metas, we
are so happy arguing about, will get fixed fast. Thats a point where you could happily STOP and live with your happy "conventional filesystem emulation", yet enjoying perfomance aspects (if perfomance hurts you, do not compile reiserfs, just like one big-red distro does, nobody would not complain. except your hard-drive mechanics sick of seeks).
But most people would not stop, and its good.
Yes, I think it would be nice to have this infrastructure in VFS. Technically. But its not possible, cause of "committee clusterfuck". Socially. Stupidly.
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 2 lines · Alexander Lyamin
Yes, I think it would be nice to have this infrastructure in VFS. Technically. But its not possible, cause of "committee clusterfuck". Socially. Stupidly.
Please explain your problems. I've not seen a single actually working proposal yet. Current reiser4 implementation apparently oopses and breaks guaranteed fs semantics, it's not going in in either reiser4 or the vfs.
Al has started a thread to hash out working semantics, but there's not been a single namesys person involved. Similar all of you have absolutely ignore every single technical question or comment but started a flamefest consisting mostly of personal attacs and "mine is longer" politics.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · Alexander Lyamin
Yes, I think it would be nice to have this infrastructure in VFS. Technically. But its not possible, cause of "committee clusterfuck". Socially. Stupidly.
Please explain your problems. I've not seen a single actually working proposal yet. Current reiser4 implementation apparently oopses and
Not true. If true - send bugreports.
Its work for me couple of months. there were few hiccups, but they got fixed quickly by [email protected]. only ext2 partition is /boot cause of BIOS limitations. Yes, i use it with LVM2 and stuff...
de facto its even more stable then reiserfs 3.6, which got issues with CONFIG_PREEMPT.
Quoted 2 lines
breaks guaranteed fs semantics, it's not going in in either reiser4 or the vfs.
A
Quoted 3 lines
Al has started a thread to hash out working semantics, but there's not been a single namesys person involved. Similar all of you have absolutely ignore
Al message had a reply.
"namesys persons" is Hans Reiser. Sufficient ?
Quoted 2 lines
every single technical question or comment but started a flamefest consisting mostly of personal attacs and "mine is longer" politics.
no need to comment on this.
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 5 lines · Alexander Lyamin
Not true. If true - send bugreports.
Its work for me couple of months. there were few hiccups, but they got fixed quickly by [email protected]. only ext2 partition is /boot cause of BIOS limitations. Yes, i use it with LVM2 and stuff...
See the mails from Christophe in this thread.
Quoted 8 lines
Quoted 2 lines
breaks guaranteed fs semantics, it's not going in in either reiser4 or the vfs.
A
Quoted 3 lines
Al has started a thread to hash out working semantics, but there's not been a single namesys person involved. Similar all of you have absolutely ignore
Al message had a reply.
"namesys persons" is Hans Reiser. Sufficient ?
http://marc.theaimsgroup.com/?t=109355582600002&r=1&w=2
I can't see Hans anywhere. And honestly Hans has been so out of touch with VFS internals that some person actually understanding the issue might be helpfull. That would probably whoever has taken over Nikita's position.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Alexander Lyamin
Its work for me couple of months. there were few hiccups, but they got fixed quickly by [email protected]. only ext2 partition is /boot cause of BIOS limitations. Yes, i use it with LVM2 and stuff...
See the mails from Christophe in this thread.
seen. noted.
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
breaks guaranteed fs semantics, it's not going in in either reiser4 or the vfs.
A
Quoted 3 lines
Al has started a thread to hash out working semantics, but there's not been a single namesys person involved. Similar all of you have absolutely ignore
Al message had a reply.
"namesys persons" is Hans Reiser. Sufficient ?
Quoted 6 lines
http://marc.theaimsgroup.com/?t=109355582600002&r=1&w=2
I can't see Hans anywhere. And honestly Hans has been so out of touch with VFS internals that some person actually understanding the issue might be helpfull. That would probably whoever has taken over Nikita's position.
I assume Vladimir Saveliev could play this out...
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Alexander LyaminQuoted 1 line · Alexander Lyamin
Not true. If true - send bugreports.
Hate to say it, but apparently symlinking out of metas oopses, but that should be trivial to fix?
Quoted 4 lines
Quoted 2 lines
Al has started a thread to hash out working semantics, but there's not been a single namesys person involved. Similar all of you have absolutely ignore
Al message had a reply.
"namesys persons" is Hans Reiser. Sufficient ?
Not to be disrespectful, but Hans has sometimes taken personal shots on the lists and that's not a productive approach. Not that he'd be the only one around to do so.
Seems to me, as Christoph said, that some other Namesys guy than Hans should participate in the Al/Linus branch of the thread with ideas.
Certainly the VFS may have to be extended right about now, so someone who knows the exact details of Reiser4 should offer ideas and I'm not so sure it's Hans. Looks like he had the ideas but not the implementation.
There's also the risk that Reiser4's implementation's don't really bend into even a modified/extended VFS because of the plugins? That's definitely something that has to be approached properly...
Signature · 1 line
mjt
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Alexander LyaminQuoted 1 line · Alexander Lyamin
And I honestly dont understand whats the other Christoph's worries are about.
I honestly don't understand what all this 'grassroot' campaining is all about. Very valid technical points have been made and mostly ignored.
The whole 'it breaks backups' noise is just that, noise.
- It breaks VFS locking rules.
- It pretends to provide a uniform way to store streams or metadata. However it only does so files and not for directories, symlinks, fifos, unix domain sockets, or device nodes, which makes it less than uniform.
- From what I saw in one part of the discussion, it allows for infinite depth recursion (file/metas/metas/metas/...). Some applications are going to have a lot of fun with that.
And finally,
- When reiserfs3 got merged, it introduced iget3 and read_inode2 in the VFS layer. Later on when I started to use them for Coda I almost immediately found serious consistency problems, resulting in the iget4_locked implementation in the 2.5 kernels.
I don't think anyone ever fixed that race in reiser3. It should hit occasionally on concurrent lookups on SMP or preempt kernels. In 2.4, Coda needed a semaphore to prevent concurrency during the iget3 lookup until the new inode is actually initialized.
Quoted 2 lines
Its got perfomance. Its there. It can emulate "conventional filesystem" behaviour, for legacy apps.
So does ramfs.
Quoted 3 lines
Yes, I think it would be nice to have this infrastructure in VFS. Technically. But its not possible, cause of "committee clusterfuck". Socially. Stupidly.
It will get there, just consider it constructive criticism. If we can help resolve or refute the technical issues, all the better. We might even end up with improvements or extensions to the VFS or MM making life easier for everyone.
Jan
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 3 lines · Jan Harkes
Quoted 1 line · Alexander Lyamin
And I honestly dont understand whats the other Christoph's worries are about.
[...]
Quoted 6 lines
- When reiserfs3 got merged, it introduced iget3 and
read_inode2in the VFS layer. Later on when I started to use them for Coda I almost immediately found serious consistency problems, resulting in theiget4_lockedimplementation in the 2.5 kernels.I don't think anyone ever fixed that race in reiser3. It should hit
Err... it was fixed.
Quoted 2 lines
Jan
Nikita.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Jan HarkesQuoted 6 lines · Jan Harkes
On Sat, Aug 28, 2004 at 03:18:07PM +0400, Alexander Lyamin wrote:
It will get there, just consider it constructive criticism. If we can help resolve or refute the technical issues, all the better. We might even end up with improvements or extensions to the VFS or MM making life easier for everyone.
That would be nice. Some nice points too (metas/metas in just noice tough).
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Christoph HellwigQuoted 1 line · Christoph Hellwig
This VFS interface is an integral part of Фvery filesystem, and it
VFS never was "an integral part" of ANY filesystem. my dog knows it. its just unified INTERFACE TO any filesystem (including reiser4).
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...
Signature · 6 lines
"the liberation loophole will make it clear.." lex lyamin - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 5 lines · Alexander Lyamin
Quoted 1 line · Christoph Hellwig
This VFS interface is an integral part of ??very filesystem, and it
VFS never was "an integral part" of ANY filesystem. my dog knows it. its just unified INTERFACE TO any filesystem (including reiser4).
You's misquoting me. IF you quoted the whole context it'd be pretty sure that the part of the filesystem that intefaces with the VFS is meant.
But one could even say VFS is integral part of a linux filesystem as it does most of the work a filesystem driver does in other operating systems.
Quoted 2 lines
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...
It really depends on how you sent them. If you had a big patch without explanations - sure.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Alexander Lyamin
Quoted 1 line · Christoph Hellwig
This VFS interface is an integral part of ??very filesystem, and it
VFS never was "an integral part" of ANY filesystem. my dog knows it. its just unified INTERFACE TO any filesystem (including reiser4).
You's misquoting me. IF you quoted the whole context it'd be pretty sure that the part of the filesystem that intefaces with the VFS is meant.
No. Its not me "misquoting", its just someone sound plain ?incoherrent?. Even if I overquoted reply with whole message, its still sound ?incohherent?.
Quoted 4 lines
But one could even say VFS is integral part of a linux filesystem as it does most of the work a filesystem driver does in other operating systems.
theres no "linux filesystem". there are "linux filesystems". thanks god.
But I it would be really grate if you'll elaborate your sentence with example of VFS functionality (lack of it) on said "other operating systems" and if you'll define "most of work".
Quoted 6 lines
Quoted 3 lines
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...It really depends on how you sent them. If you had a big patch without explanations - sure.
It would work with small tweaks, but you just can take a look at reiser4 code and you'll understand that it just could not be chopped in "set of small patches" altough it could be documented better ofcourse, but its really well commented already.
some times, some approaches to some problems just would not work.
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 6 lines · Alexander Lyamin
Quoted 3 lines
But one could even say VFS is integral part of a linux filesystem as it does most of the work a filesystem driver does in other operating systems.
theres no "linux filesystem". there are "linux filesystems". thanks god.
a linux filesystem, not the linux filesystem, please read again.
Quoted 3 lines
But I it would be really grate if you'll elaborate your sentence with example of VFS functionality (lack of it) on said "other operating systems" and if you'll define "most of work".
most trivial example is namespace locking, in *BSD, Windows, SVR4 and derivates it's done in the lowlevel filesystem. In plan9, Linux and soon DragonlyBSD it's done in the VFS.
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...It really depends on how you sent them. If you had a big patch without explanations - sure.
It would work with small tweaks, but you just can take a look at reiser4 code and you'll understand that it just could not be chopped in "set of small patches" altough it could be documented better ofcourse, but its really well commented already.
some times, some approaches to some problems just would not work.
You still haven't even bother explaining what you want to do. It's hard to argue against vague uncertainity.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Alexander Lyamin
Quoted 3 lines
But one could even say VFS is integral part of a linux filesystem as it does most of the work a filesystem driver does in other operating systems.
theres no "linux filesystem". there are "linux filesystems". thanks god.
a linux filesystem, not the linux filesystem, please read again.
Quoted 7 lines
Quoted 3 lines
But I it would be really grate if you'll elaborate your sentence with example of VFS functionality (lack of it) on said "other operating systems" and if you'll define "most of work".
most trivial example is namespace locking, in *BSD, Windows, SVR4 and derivates it's done in the lowlevel filesystem. In plan9, Linux and soon DragonlyBSD it's done in the VFS.
ok. good examples.
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...It really depends on how you sent them. If you had a big patch without explanations - sure.
It would work with small tweaks, but you just can take a look at reiser4 code and you'll understand that it just could not be chopped in "set of small patches" altough it could be documented better ofcourse, but its really well commented already.
Quoted 4 lines
Quoted 1 line
some times, some approaches to some problems just would not work.
You still haven't even bother explaining what you want to do. It's hard to argue against vague uncertainity.
o files as directories - no oppinion on that.
o metafiles - AFAIK it was product of Nikita Danilov just playing and fooling.
Probably solution that will satisfy you is to have "legacy (dumb?) mode" which is leaving all this fancy stuff out of sight.
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 7 lines · Alexander Lyamin
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines
some times, some approaches to some problems just would not work.
You still haven't even bother explaining what you want to do. It's hard to argue against vague uncertainity.
Quoted 6 lines
o files as directories - no oppinion on that.
o metafiles - AFAIK it was product of Nikita Danilov just playing and fooling.
Probably solution that will satisfy you is to have "legacy (dumb?) mode" which is leaving all this fancy stuff out of sight.
and enabled compile time or mount option...
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins
In reply to Alexander LyaminQuoted 5 lines · Alexander Lyamin
o metafiles - AFAIK it was product of Nikita Danilov just playing and fooling.
No, it was not, it was an idea I had for so long I cannot remember when, maybe 1984, and I proposed it to darpa, and then nikita got told about it probably from being told to read the web page on our darpa project, and he took on the task of coding it.
Hans
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Alexander LyaminQuoted 2 lines · Alexander Lyamin
P.S. I imagine, how much flamed it would be if reiser4 made any intensive changes in linux VFS code...
Surely it would be flamefest galore, but thanks to Reiser4 there may be some VFS changes to that direction, maybe completely from Reiser4. Should keep some people at bay if the chances weren't so much replacing VFS than extending it.
Signature · 1 line
mjt
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Alexander LyaminQuoted 2 lines · Alexander Lyamin
VFS never was "an integral part" of ANY filesystem. my dog knows it.
That's not really true.
Name handling (dentry layer, mounting) is very much an integral part of the filesystem. Almost everything else in the VFS is "helper functions", ie a filesystem can choose to ignore buffer heads, page cache etc, but a filesystem really cannot ignore or override the VFS naming stuff.
(Arguably the page cache isn't part of the VFS layer at all, it's really a memory management thing, although it's so intertwined with the VFS helper functions that you can't really draw the line).
Quoted 1 line
its just unified INTERFACE TO any filesystem (including reiser4).
True, but that's not the whole truth. It's way more than just an interface. It's a set of rules, and it's in many way the controlling party.
Linus
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 7 lines · Linus Torvalds
Quoted 2 lines · Alexander Lyamin
VFS never was "an integral part" of ANY filesystem. my dog knows it.
That's not really true.
Theres some truth. And its really arguably, but I think, I see your point.
And taking on the situation with reiser4 with "smartmost VFS" approach, time should pass and with time and expirience on hands it will be evident what should go in VFS. Now its may be too early.
Considering "amazing PR skills" of Hans Reiser it was the only viable way to get this changes in VFS. Cause, ironically, mr. Hellwig that currently demand it to be scrapped out or go in VFS would instakill Hans Reiser (i know many people would:) if he only touched holy cow of VFS for any reiser4 purpose.
As I told before, some technically right things just do not work in this imperfect world. You have to count with social issues, and Hans Reiser wont, he just avoid them whenever its possible.
Quoted 9 lines
Name handling (dentry layer, mounting) is very much an integral part of the filesystem. Almost everything else in the VFS is "helper functions", ie a filesystem can choose to ignore buffer heads, page cache etc, but a filesystem really cannot ignore or override the VFS naming stuff.
(Arguably the page cache isn't part of the VFS layer at all, it's really a memory management thing, although it's so intertwined with the VFS helper functions that you can't really draw the line).
Quoted 7 lines
Quoted 1 line
its just unified INTERFACE TO any filesystem (including reiser4).
True, but that's not the whole truth. It's way more than just an interface. It's a set of rules, and it's in many way the controlling party.
Linus
"True, but thats not the whole truth."
Signature · 2 lines
"the liberation loophole will make it clear.." lex lyamin
Re: reiser4 plugins (was: silent semantic changes with reiser4)
Quoted 9 lines · Alexander Lyamin
And taking on the situation with reiser4 with "smartmost VFS" approach, time should pass and with time and expirience on hands it will be evident what should go in VFS. Now its may be too early.
Considering "amazing PR skills" of Hans Reiser it was the only viable way to get this changes in VFS. Cause, ironically, mr. Hellwig that currently demand it to be scrapped out or go in VFS would instakill Hans Reiser (i know many people would:) if he only touched holy cow of VFS for any reiser4 purpose.
Could you please stop talking such inproven crap?
Re: reiser4 plugins
I think it is reasonable to make the -nopseudos (turns off the metafiles ) mount option mandatory, until the bugs are resolved.
Our testing did not find these metafile/VFS bugs because of the reason for all our bugs, we screwed up.
There is a distinct difference between some persons and I, which is that some think all of reiser4 should be excluded until metafiles are implemented by VFS some long time from now, and I, in that I merely think buggy optional features should be turned off until they are fixed. I, being renowned for my paranoia and asininity as I am, think these persons find it convenient as an excuse to keep us from competing, and I think that if we were slower there would be less hassle every time we try to get into the kernel.
While reiser4 has some significant roughnesses remaining in its performance, I think the average user would find it performs better than other filesystems, and is stable enough for, say, a laptop, and I predict that by the time we have it stable enough for mission critical servers, all the roughness in various important corner cases will be gone.
Persons benchmarking it with tarballs, please be sure to use tarballs created on reiser4, not ext2 tarballs, readdir order matters a lot for sorted directory filesystems.
Hans
Re: reiser4 plugins
Quoted 22 lines · Hans Reiser
I think it is reasonable to make the -nopseudos (turns off the metafiles ) mount option mandatory, until the bugs are resolved.
Our testing did not find these metafile/VFS bugs because of the reason for all our bugs, we screwed up.
There is a distinct difference between some persons and I, which is that some think all of reiser4 should be excluded until metafiles are implemented by VFS some long time from now, and I, in that I merely think buggy optional features should be turned off until they are fixed. I, being renowned for my paranoia and asininity as I am, think these persons find it convenient as an excuse to keep us from competing, and I think that if we were slower there would be less hassle every time we try to get into the kernel.
While reiser4 has some significant roughnesses remaining in its performance, I think the average user would find it performs better than other filesystems, and is stable enough for, say, a laptop, and I predict that by the time we have it stable enough for mission critical servers, all the roughness in various important corner cases will be gone.
Quoted 3 lines
Persons benchmarking it with tarballs, please be sure to use tarballs created on reiser4, not ext2 tarballs, readdir order matters a lot for sorted directory filesystems.
hmm, so probably we have to wait until all
tar packagers moved to reiser4, so that the
available tar files are 'sorted properly' ...
best,
Herbert
Quoted 5 lines
Hans
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: reiser4 plugins
Quoted 10 lines · Herbert Poetzl
hmm, so probably we have to wait until all
tar packagers moved to reiser4, so that the
available tar files are 'sorted properly' ...best,
Herbert
Or wait for a repacker, which will probably happen sooner. Distros that use reiser4 will probably tar in reiser4 order.
Re: reiser4 plugins (was: silent semantic changes with reiser4)
In reply to Alexander LyaminQuoted 6 lines · Alexander Lyamin
Considering "amazing PR skills" of Hans Reiser it was the only viable way to get this changes in VFS. Cause, ironically, mr. Hellwig that currently demand it to be scrapped out or go in VFS would instakill Hans Reiser (i know many people would:) if he only touched holy cow of VFS for any reiser4 purpose.
Hey, you don't have to try to convince me - I haven't been arguing against the reiser4 approach. I think it's a prototyping scheme, and quite frankly I don't think you _can_ get the name lookup right without real VFS support (races, namespaces etc are just not something you can solve in the filesystem).
But the fact that name lookup does seriously need VFS support means that I don't think we want to merge reiser4 as-is. No way. That doesn't mean that I think reiser4 was _wrong_.
And I certainly agree that there are personality issues, and they are not all just Hans' ;)
Linus
Am Donnerstag, den 26.08.2004, 15:07 +0200 schrieb Christoph Hellwig:
Quoted 7 lines
Quoted 4 lines
The reiser4 core doesn't know about inodes, directories or files. It's the glue code between the VFS and the storage layer that does. It's implemented as a plugin. This has nothing to do with semantic enhancements yet. These should be removed for now and made a 2.7 topic.
Oh yes, it is. As soon as you use different access methods on an overlapping set of objects you see exactly the problems I described.
Right. That shouldn't happen. Since an object is usally tied to exactly one plugin this can't happen I think. At least as long the programmer doesn't mess anything up.
Quoted 3 lines
If they don't overlap there's no point for the plugins to start with, you'll better turn the core into a library that can be used by different projects then.
I think that's what Hans is trying to suggest. The core is theoretically usable for anything. He made a filesystem of it.
You can see reiser4 as a library and the UNIX directory and file plugins as the filesystem. That's why they are linked in uncoditionally because it doesn't make sense otherwise. It's mainly the naming that seems to confuse people.
Christoph Hellwig and Christophe Saout, I think you two are miscommunicating a little.
I've never looked at reiser4 code, but I think I understand what you are both saying, so I will explain.
Quoted 5 lines · Christoph Hellwig
Here comes the problem. All the access checking/race avoidance/loop creation avoiced, in short the posix+extension semantics are implemented in the Linux VFS layer. If you want to allow a second access method (e.g. Hans' pet syscall) you'd have to duplicate all VFS functioanlity inside reiser4.
That would be good. Even better would be if VFS implemented the best semantics that we agree is nice, after some experimenting with reiser4 lets us discover what works well.
Quoted 11 lines
Quoted 4 lines
The reiser4 core doesn't know about inodes, directories or files. It's the glue code between the VFS and the storage layer that does. It's implemented as a plugin. This has nothing to do with semantic enhancements yet. These should be removed for now and made a 2.7 topic.
Oh yes, it is. As soon as you use different access methods on an overlapping set of objects you see exactly the problems I described.
If they don't overlap there's no point for the plugins to start with, you'll better turn the core into a library that can be used by different projects then.
Firstly, the core library _is_ used by different projects. That's the commercial aim of reiser4: to be used by projects other than just as Linux filesystem. For example it might be used by a database, or a portable application which needs to store structured data in a flat file (with random access). A good abstraction makes it more useful than "just" a filesystem.
Secondly, the reiser4 design makes the "high-level plugin" interface a good clean abstraction. It's conceptually simple and versatile, so simplifies the code and makes it easier to try new ideas as well.
I think the disagreement between you two comes down to the idea that a generally useful API abstraction to file-like objects really should be somewhere in the VFS, and not specific to a single filesystem.
Unfortunately, the problem is that reiser4 is the only filesystem which is _technically capable_ of implementing that abstraction in a practical way, apparently. (I'm not sure if this is really true. reiser4's object model is not the same as paths and inodes, but the impedance mismatch doesn't seem huge.)
Perhaps in future some other filesystems could do it. Then it would make sense for the API to be common between them.
At the same time, some of the features which Hans Reiser would like to offer users -- especially things like metadata indexing -- don't seem to be very practical on top of the VFS abstraction.
These are conflicting goals. Hence the argument.
VFS is very POSIX, which rules out some interesting things like multiple views of an ordinary file (i.e. viewing a flat file and it's structured form together), coherent files (i.e. metadata which is calculated from the file contents and always guaranteed to match it), and real time indexing (i.e. "grep", "locate" and "local-google" but fancier, always up to date, and still fast).
Those features can be implemented poorly on top of POSIX, and hence poorly on top of VFS. We do that today. It works, it's simple, but it sucks. Sometimes it goes wrong (index doesn't match files), it's slow (locate isn't real-time, and if grep kept content indexes it would still be too slow to verify them), and it's not really simple as you have to use special tools for every file format these days, each with their own unique interface.
I think we can tidy that up a lot, still using the VFS, but with some extra hooks. But it's not clear what hooks those would be, and how the interesting features would be implemented by other POSIX-only filesystems. It'd be more useful: I want the fancy stuff to work over NFS to a bog standard server, or over an old ext2 filesystem that mustn't be upgraded, not just reiser4, even if I don't have the same performance and it has to create lots of articial "metadata" files to simulate the fancy stuff.
-- Jamie
Quoted 6 lines
Firstly, the core library _is_ used by different projects. That's the commercial aim of reiser4: to be used by projects other than just as Linux filesystem. For example it might be used by a database, or a portable application which needs to store structured data in a flat file (with random access). A good abstraction makes it more useful than "just" a filesystem.
Which is okay as long as it still fits in the kernel. Remember that lots of projects had to adjust so far despite the commerical aims of their creators.
Quoted 3 lines
I think the disagreement between you two comes down to the idea that a generally useful API abstraction to file-like objects really should be somewhere in the VFS, and not specific to a single filesystem.
IT should, and in fact it actually is most of the part. We can have differnt operation vectors per object, but reiser4 is the only filesystem in the tree not making use of that but provinding only a single one and then dispatching internally. Even XFS that carries around and horrible internal dispatching layer as IRIX legacy gets this right.
Quoted 5 lines
Unfortunately, the problem is that reiser4 is the only filesystem which is
_technicallycapable_of implementing that abstraction in a practical way, apparently. (I'm not sure if this is really true. reiser4's object model is not the same as paths and inodes, but the impedance mismatch doesn't seem huge.)
Umm, no. In fact every filesystem does this. There's not too many objects with different namespace semantic: regular files and special files vs directories vs symlinks basically, but as soon as you go to the data patch you can have hundrets of different file_operations on a single filesystems (for special files).
Quoted 11 lines · Christoph Hellwig
Quoted 5 lines
Unfortunately, the problem is that reiser4 is the only filesystem which is
_technicallycapable_of implementing that abstraction in a practical way, apparently. (I'm not sure if this is really true. reiser4's object model is not the same as paths and inodes, but the impedance mismatch doesn't seem huge.)Umm, no. In fact every filesystem does this. There's not too many objects with different namespace semantic: regular files and special files vs directories vs symlinks basically, but as soon as you go to the data patch you can have hundrets of different
file_operationson a single filesystems (for special files).
Remember that reiser4 allows you to operate on little pieces of data, glueing and rearranging them inside files (something like that).
No other filesystem has that capability, and it's a data model which the fancy features (when they exist) will use.
You can map those pieces to underlying directories and files and renames and unlinks, so that the fancy stuff works on other filesystems, but it would be a useless model because those other filesystems wouldn't be recognisably "ordinary" files any more.
For reiser4 to expose that model through a VFS interface, and the fancy stuff to use it through the VFS interface, and for the fancy stuff to work (even imperfectly) on other filesystems which don't offer those operations, some kind of fall-back "store metadata and fragment rearrangements in auxiliary files with special names" layer would be requied. That's a big job.
I think it's a good job to do (funding, anyone? :), and the right place for that (imperfect but useful) fall-back layer is userspace with perhaps minimal VFS support. Another reason to put the fall-back layer in userspace is that applications which depend on the fancy stuff can still be portable to other OSes, working, but a bit smoother, faster and more "integrated" on reiser4.
-- Jamie
Quoted 11 lines · Jamie Lokier
Remember that reiser4 allows you to operate on little pieces of data, glueing and rearranging them inside files (something like that).
No other filesystem has that capability, and it's a data model which the fancy features (when they exist) will use.
You can map those pieces to underlying directories and files and renames and unlinks, so that the fancy stuff works on other filesystems, but it would be a useless model because those other filesystems wouldn't be recognisably "ordinary" files any more.
Quoted 6 lines
For reiser4 to expose that model through a VFS interface, and the fancy stuff to use it through the VFS interface, and for the fancy stuff to work (even imperfectly) on other filesystems which don't offer those operations, some kind of fall-back "store metadata and fragment rearrangements in auxiliary files with special names" layer would be requied. That's a big job.
I seem to miss those files in the current implementation. But again the big question is how will the interface look? If the smaller objects interact with normal files (link/rename, contained in normal directories), they will have to obey the same locking protocols. If not a filesystem could experiment with it of course.
Quoted 4 lines · Christoph Hellwig
If the smaller objects interact with normal files (link/rename, contained in normal directories), they will have to obey the same locking protocols. If not a filesystem could experiment with it of course.
I think the smaller objects will consist of special files, which are magic attributes like the ones you currently see in reiser4, and ordinary files (which might themselves be containers).
Link/rename/locking etc. should work as usual on the ordinary smaller files, but probably aren't allowed at all on the special attribute files, except where there's an appropriate meaning. (For example locking certain attributes might have an appropriate meaning).
It would make sense for the special attributes file to not identify as "regular files" (S_IFREG), but there aren't many mode bits to play with. They should also be harder to find than ordinary smaller files.
-- Jamie
Quoted 21 lines · Christophe Saout
Am Donnerstag, den 26.08.2004, 01:45 -0700 schrieb Andrew Morton:
Quoted 4 lines
And describe the "plugin" system. Why does the filesystem need such a thing (other filesystems get their features via `patch -p1')?
Ok, let me try. (Hans, please don't shoot me if I don't get every detail right, I'm trying to simplify and translate)
The reiser4 core is just a big and fast storage layer using a single tree. It is bound to a mount point and uses the page cache to manage its memory. The only thing it can do on its own is to flush dirty data to the disk when the VM wants to (memory pressure) or the VFS wants to (unmount, sync) or some "plugin" wants to.
Additionally it's completely atomic (with respect to crashes, no isolation like in databases), comparable to data=journal but without the overhead of using a journal for everything.
Quoted 6 lines
Up to this point there are no users of this "database" and it does not implement any of the VFS methods for a filesystem (except mount and unmount perhaps).
All the functionality is provided to
^to^via
apologies for the correction but it might confuse some
Quoted 4 lines
the plugins. You can insert,
remove, lookup or modify key:object pairs (with an index into the object). The object
^object^item
perform that substitution everywhere in this email
Quoted 35 lines
is a sequence of units. For files a unit would be 1
byte and the index would be the byte offset. For directories the unit would be 1 entry and the index would be the filename.Now there are some plugins that define how the storage layout on the disk is (some kind of "backend" plugins).
*And* there are plugins which are users of the "reiser4 client API" and implement the actual VFS methods.
There's a UNIX directory plugin and a UNIX file plugin.
Directories, inodes and file content are just key:object pairs and the plugins know how to operate on these.
There's a new plugin in work that also implements UNIX file semantics but stores the data for that file encrypted and/or compressed.
These plugins live between the VFS and the storage layer.
Just like the filesystems live between the VFS and the block layer (Hans would say that filesystems are VFS plugins ;-)).
Quoted 4 lines
And what are the licensing implications of plugins? Are they derived works? Must they be GPL'ed?
I suppose yes, at least currently, since they can only be linked with reiser4, there's no module infrastructure.
Quoted 2 lines · Hans Reiser
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database
Dou you know a nice thing? We (as in the Linux Community) don't have to compete with anyone. Sure, we're usually trying to be better than anyone else, but unlike companies under maret pressure we can wait until something is ready.
Again, if you think you want your work in Linux cooperate with the Linux Developers, and as you have seen in this thread there's a pretty broad consensus that we want things working at the VFS (and actually working of course)
Quoted 5 lines · Christoph Hellwig
Dou you know a nice thing? We (as in the Linux Community) don't have to compete with anyone. Sure, we're usually trying to be better than anyone else, but unlike companies under maret pressure we can wait until something is ready.
It won't get ready unless it's made ready, yes?
And what about the time when people will move away from Linux because Linux has nothing but crappy file systems to offer?
Sure, it's not that we'd have to compete, but...
Quoted 4 lines
Again, if you think you want your work in Linux cooperate with the Linux Developers, and as you have seen in this thread there's a pretty broad consensus that we want things working at the VFS (and actually working of course)
So move it into VFS. Neext! ;)
Signature · 1 line
mjt
Quoted 8 lines · Christoph Hellwig
Quoted 2 lines · Hans Reiser
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database
Dou you know a nice thing? We (as in the Linux Community) don't have to compete with anyone. Sure, we're usually trying to be better than anyone else, but unlike companies under maret pressure we can wait until something is ready.
By the way, this kind of features can be achieved easily in userspace with, for example, ext3, beagle (a userspace fulltext indexing daemon) and some (d|i)notify magic.
Quoted 64 lines · Hans Reiser
Quoted 12 lines · Andrew Morton
Quoted 5 lines · Hans Reiser
I had not intended to respond to this because I have nothing positive to say, but Andrew said I needed to respond and suggested I should copy Linus.
Yes, but I didn't say "flame Christoph and ignore the issues" ;)
Oh....;-)
Quoted 6 lines
There are lots of little things to do with implementation, coding style, module exports, deadlocks, what code goes where, etc. These are all normal daily kernel business and we should set them aside for now and concentrate on the bigger issues.
Yes, you are right, but I am not sure Viro will go along with that..... ;-)
Quoted 12 lines
And as I see it, there are two big issues:
a) reiser4 extends the Linux API in ways which POSIX/Unix/etc do not anticipate and
b) it does this within the context of just a single filesystem.
I see three possible responses:
a) accept the reiser4-only extensions as-is (possibly with post-review modifications, of course) or
Quoted 9 lines
b) accept the reiser4-only extensions with a view to turning them into kernel-wide extensions at some time in the future, so all filesystems will offer the extensions (as much as poss) or
c) reject the extensions.
My own order of preference is b) c) a).
I don't object to b), though I think b) should wait for 2.7 and reiser4 should not.
Quoted 5 lines
The fact that one filesystem will
offer features which other filesystems do not and cannot offer makes me queasy for some reason.Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database functionality into the filesystem. It takes 11 years of serious research to build a clean storage layer able to handle doing that. Reiser4 has done that, finally. None of the other Linux filesystems have. The next major release of ReiserFS is going to be bursting with semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites. They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Quoted 9 lines
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards. Help me get the next level on the tower before they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....
couldnt be more true
Quoted 48 lines
Give Saveliev and I some credit. 10 years of hard work at an ivory tower nobody thought mattered. Now the battle leaves the browser and swings our way. Don't duplicate that infrastructure, use it.
There is so much we could use help with if talented people like you chose to contribute.
Quoted 9 lines
b) means that at some time in the future we need to hoist the reiser4 extensions (at a conceptual level) (and probably with restrictions) up into the VFS. This will involve much thought, argument and work.
To get us started on this route it would really help me (and, probably, others) if you could describe what these API extensions are in a very simple way, without referring to incomprehehsible web pages,
what is not comprehensible....?
Quoted 4 lines
and without
using terms which non-reiser4 people don't understand.Well, I agree that there is value in defining things in more detail than we have.
Quoted 21 lines
It would be best if each extension was addressed in a separate email thread.
We also need to discuss what a reiser4 "module" is, what its capabilities are, and what licensing implications they have.
Then, we can look at each one and say "yup, that makes sense - we want Linux to do that" and we can also think about how we would implement it at the VFS level.
If we follow the above route I believe we can make progress in a technical direction and not get deadlocked on personal/political stuff.
Now, an alternative to all the above is to just merge reiser4 as-is, after addressing all the lower-level coding issues. And see what happens. That may be a thing which Linus wishes to do. I'm easy.
Signature · 1 line
Redeeman <[email protected]>
Quoted 1 line · Hans Reiser
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database functionality into the filesystem. It takes 11 years of serious
Hans,
I'm very curious about your ideas on how to put search engine and database functionality into the filesystem. Although I've let the Befs filesystem driver largely stagnate over the past two years, from time to time I think about the problem of exporting to userspace the attribute indexes that BeFS keeps on disk.
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me. However, the best alternative I've come up with is to simply export the index data as a special file (perhaps in sysfs?) and have userspace responsible for searching the index. That would probably work, but it wouldn't help other filesystems that implement even a different index format, much less a different form of extra searchability.
Signature · 2 lines
Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman
Am Donnerstag, den 26.08.2004, 12:32 -0400 schrieb Will Dyson:
Quoted 6 lines
Quoted 3 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple, and that means we need to put search engine and database functionality into the filesystem. It takes 11 years of serious
I'm very curious about your ideas on how to put search engine and database functionality into the filesystem.
I could imagine something like this.
There are some special folders or files or whatever under every file where some userspace can put some metadata. A keyword perhaps.
echo linux > file.bla/keywords/topic
The filesystem might then automatically put these keywords into an index and then provide a search mechanism elsewhere where it could ask "find me all dentries with the keyword 'linux'." and it would return a list like locate does. Only that it's in realtime and also works when moving the file around (but not when copying with an unaware program for obvious reasons).
Quoted 8 lines · Christophe Saout
echo linux > file.bla/keywords/topic
The filesystem might then automatically put these keywords into an index and then provide a search mechanism elsewhere where it could ask "find me all dentries with the keyword 'linux'." and it would return a list like locate does. Only that it's in realtime and also works when moving the file around (but not when copying with an unaware program for obvious reasons).
It could work even when copying with an unaware program - provided the're a tool which knows to extract metadata from files where that hasn't been done already, or where the file's been modified.
-- Jamie
Quoted 3 lines · Will Dyson
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me.
Why?
Quoted 1 line
However, the best alternative I've come up with is to simply export the index data as a special file (perhaps in sysfs?) and have userspace responsible for searching the index.
That is the best implementation suggestion I've heard for splitting the filesystem into two parts, one in user space and one in kernel, but I still don't trust it to work well.
Quoted 2 lines
That would probably work, but it wouldn't help other filesystems that implement even a different index format, much less a different form of extra searchability.
After reiser6 is implemented, we'll have a better idea of what parts need what from what other parts. Until we get there, it needs to be kept together. Frankly, I suspect that naming is not going to split so easily, but when it is done we'll be able to know. The problems of putting too much functionality into the kernel are less than those of partitioning the filesystem code, and defining an inflexible API between the two parts. Kernel interfaces are fairly inflexible because there will always be some moron who sidesteps the fs library to program directly to the kernel interface, gets screwed when the interface changes, has the nerve to complain about it, and works for some powerful distro.
Hans
Quoted 5 lines · Hans Reiser
Quoted 2 lines · Will Dyson
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me.
Why?
Hmm. Trying to explain aesthetic judgments is always fun, but I'll try.
String parsing bloats the kernel with code that will be called rarely, and doing it inside the filesystem module makes for duplicate code if more than one filesystem does it. But a good common parser routine (or a kernel api that takes a pre-compiled parse tree) would reduce the bad taste.
The real objection I have is that it puts the kernel in the position of doing more work than it has to for the system to operate correctly and efficiently. The user wants to know what files match a certain set of criteria. The filesystem provides special features which can greatly accelerate some searches. Does it make more sense to move the functionality of /usr/bin/find into the kernel, or to export the index information so that an enhanced version of find can make use of it?
I don't think having find in the kernel would be worth the cost or complexity.
However, now that I've had to think about it while writing the above, it occurs to me that if we wanted to offer something like the beos's live queries, doing it in the kernel might be the way to go.
For the 99.9% of people who were not beos users back in the day, the "live query" was a way to register a query string with the kernel, so that you got notifications when the list of files matching the query changed. It was pretty cool, but this is really just blue-skying since I am not stepping up to write such a beast any time soon.
Quoted 3 lines
Quoted 1 line
However, the best alternative I've come up with is to simply export the index data as a special file (perhaps in sysfs?) and have userspace responsible for searching the index.
That is the best implementation suggestion I've heard for splitting the filesystem into two parts, one in user space and one in kernel, but I still don't trust it to work well.
Why not? And if it really splits the filesystem into two parts depends on which of the two following statements you agree with more:
"Fast searching is a feature of the filesystem" "Maintaining indexes is a feature of the filesystem"
PS.
The file-as-directory attribute/stream/whatever model is a much better fit for befs's internals than the xattr api. If the kernel supported it, I would enable support for it in befs.
Signature · 2 lines
Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman
Quoted 8 lines · Will Dyson
Quoted 6 lines · Hans Reiser
Quoted 2 lines · Will Dyson
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me.
Quoted 6 lines
Quoted 1 line
Why?
Hmm. Trying to explain aesthetic judgments is always fun, but I'll try.
String parsing bloats the kernel with code that will be called rarely, and doing it inside the filesystem module makes for duplicate code if more than one filesystem does it. But a good common parser routine (or a kernel api that takes a pre-compiled parse tree) would reduce the bad taste.
Like say.. printk() ? :)
Quoted 1 line
The real objection I have is that it puts the kernel in the position of doing more work than it has to for the system to operate correctly and efficiently. The user wants to know what files match a certain set of criteria. The filesystem provides special features which can greatly accelerate some searches. Does it make more sense to move the functionality of
/usr/bin/findinto the kernel, or to export the index information so that an enhanced version of find can make use of it?
I think it depends largely on where you see file systems going 5, 10, 20 years from now. Are they going to be decadent designs or will they be flush with meta data and other tidbits? Where does the heuristic line sit when it becomes better to put such a function into the kernel v.s. user land?
Quoted 1 line
I don't think having find in the kernel would be worth the cost or complexity.
Probably not. But as I view it, file systems are slowly evolving into relational objects and the margin between what are files and directories versus content within said objects is shrinking. More and more, people are using a relational database to store content that once resided in singular files.
Sure, it makes for a much fatter *FS system, but the user doesn't care too much, he simply enjoys the ability to manage, search, and cross reference his content much more easily.
And then comes the "it's a user land thing" comment again. And again the response. When does moving this from user land into kernel land become a better choice.
With the file systems we have today, it's really not much of a gain compared to the cost of the move.
Consider Reiser4 now. More and more meta data is being used in regards to files. That margin is shrinking.
BeOS broached it, Microsoft is building it. Just because they did it doesn't mean we have to do it nor that it is right.
But it's food for thought. Especially as more and more tidbits get associated with files.
-david
Quoted 8 lines · David Ford
Quoted 6 lines · Will Dyson
Quoted 2 lines · Hans Reiser
Will Dyson wrote:
Quoted 6 lines
Quoted 1 line
String parsing bloats the kernel with code that will be called rarely, and doing it inside the filesystem module makes for duplicate code if more than one filesystem does it. But a good common parser routine (or a kernel api that takes a pre-compiled parse tree) would reduce the bad taste.
Like say..
printk()? :)
or namei()....;-)
Seriously, what we are doing is making namei() more powerful. That is all. Currently namei() is very simple. Evolution happens.
Hans
I think there are two ways to analyze the code boundary issue. One is "does it belong in the kernel?" Another is, "does it belong in the filesystem. and if so should name resolution in a filesystem be split into two parts, one in kernel, and one in user space." In ten years I might have the knowledge needed to make such a split, but I know for sure that I don't know how to do it today without regretting it tomorrow, and I don't really have confidence that I will ever be able to do it without losing performance.
Glad that BeFS finds the new model better.:)
Hans
Quoted 38 lines · Will Dyson
Quoted 7 lines · Hans Reiser
Quoted 2 lines · Will Dyson
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me.
Why?
Hmm. Trying to explain aesthetic judgments is always fun, but I'll try.
String parsing bloats the kernel with code that will be called rarely, and doing it inside the filesystem module makes for duplicate code if more than one filesystem does it. But a good common parser routine (or a kernel api that takes a pre-compiled parse tree) would reduce the bad taste.
The real objection I have is that it puts the kernel in the position of doing more work than it has to for the system to operate correctly and efficiently. The user wants to know what files match a certain set of criteria. The filesystem provides special features which can greatly accelerate some searches. Does it make more sense to move the functionality of
/usr/bin/findinto the kernel, or to export the index information so that an enhanced version of find can make use of it?I don't think having find in the kernel would be worth the cost or complexity.
However, now that I've had to think about it while writing the above, it occurs to me that if we wanted to offer something like the beos's live queries, doing it in the kernel might be the way to go.
For the 99.9% of people who were not beos users back in the day, the "live query" was a way to register a query string with the kernel, so that you got notifications when the list of files matching the query changed. It was pretty cool, but this is really just blue-skying since I am not stepping up to write such a beast any time soon.
Quoted 4 lines
Quoted 1 line
However, the best alternative I've come up with is to simply export the index data as a special file (perhaps in sysfs?) and have userspace responsible for searching the index.
That is the best implementation suggestion I've heard for splitting the filesystem into two parts, one in user space and one in kernel, but I still don't trust it to work well.
Why not? And if it really splits the filesystem into two parts depends on which of the two following statements you agree with more:
"Fast searching is a feature of the filesystem" "Maintaining indexes is a feature of the filesystem"
PS.
The file-as-directory attribute/stream/whatever model is a much better fit for befs's internals than the xattr api. If the kernel supported it, I would enable support for it in befs.
Quoted 1 line · Hans Reiser
I think there are two ways to analyze the code boundary issue. One is "does it belong in the kernel?" Another is, "does it belong in the filesystem. and if so should name resolution in a filesystem be split into two parts, one in kernel, and one in user space." In ten years I might have the knowledge needed to make such a split, but I know for sure that I don't know how to do it today without regretting it tomorrow, and I don't really have confidence that I will ever be able to do it without losing performance.
I don't see how exporting a set of indices on file attributes to userspace constitutes putting part of the name resolution into userspace. A file's name (or names, in the case of hardlinks) would still be determined entirely within the filesystem.
The more I think about it, the more I am convinced that "the index" is the correct primative to use for exposing any filesystem's fast searching features.
Signature · 2 lines
Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman
Separating Indexing and Searching (was silent semantic changes with reiser4)
In reply to Will DysonWill Dyson wrote on Fri, 27 Aug 2004 14:20:29 -0400:
Quoted 8 lines
Quoted 7 lines · Hans Reiser
Quoted 5 lines · Will Dyson
In the original BeOS, they solved the problem by having the filesystem driver itself take a text query string and parse it, returning a list of inodes that match. The whole business of parsing a query string in the kernel (let alone in the filesystem driver) has always seemed ugly to me.
Quoted 8 lines
Quoted 1 line
Why?
Hmm. Trying to explain aesthetic judgments is always fun, but I'll try.
String parsing bloats the kernel with code that will be called rarely, and doing it inside the filesystem module makes for duplicate code if more than one filesystem does it. But a good common parser routine (or a kernel api that takes a pre-compiled parse tree) would reduce the bad taste.
Not only bloat, but time wasted reinventing the wheel. For my experimental file system (http://members.rogers.com/agmsbeos/AGMSRAMFileSystem.readme - see the Nifty Features chapter), I had to figure out the BFS query language (it was documented but didn't have every little detail explained - some experimentation was needed), then write a tokenizer and parser for it, to convert it down to a parse tree that could be used during the query's life. Good exercise for the programmer, but duplication of effort.
I also added a few new things to the query language, but because the parsing is done by each file system separately, my "improvements" won't show up in other file systems.
Quoted 5 lines
For the 99.9% of people who were not beos users back in the day, the "live query" was a way to register a query string with the kernel, so that you got notifications when the list of files matching the query changed. It was pretty cool, but this is really just blue-skying since I am not stepping up to write such a beast any time soon.
Kind of like that. For performance, the query string is converted into a parse tree and then all file operations that touch any attribute mentioned in the query get evaluated against the parse tree to see if the result (in or out of the query result set) has changed. If it changes, then a kernel facility is used to broadcast a message describing the change and file involved to all parties monitoring that query. Of course, before becoming live, the existing files that match the query are found by iterating over an index (choosing the appropriate index is an optimization trick).
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
However, the best alternative I've come up with is to simply export the index data as a special file (perhaps in sysfs?) and have userspace responsible for searching the index.
That is the best implementation suggestion I've heard for splitting the filesystem into two parts, one in user space and one in kernel, but I still don't trust it to work well.
Quoted 5 lines
Why not? And if it really splits the filesystem into two parts depends on which of the two following statements you agree with more:
"Fast searching is a feature of the filesystem" "Maintaining indexes is a feature of the filesystem"
I like that. Put the indexing and a related attribute change update notification mechanism into the kernel. User land libraries can build on that to implement whatever query language you want, thus saving work and having a common language for all file system varieties that support indices.
However, one of my (unfinished) experiments was to have magic directories that show query results as their contents. One attribute of the directory (or even its name) would be the query string. That way even old software (like "ls") could use queries! Implementing queries-as-directories might require moving some things back into the kernel, or at least into some plug-in level.
- Alex
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
Quoted 5 lines · Alexander G. M. Smith
However, one of my (unfinished) experiments was to have magic directories that show query results as their contents. One attribute of the directory (or even its name) would be the query string. That way even old software (like "ls") could use queries! Implementing queries-as-directories might require moving some things back into the kernel, or at least into some plug-in level.
Beautiful example of the sort of thing that I don't want to be locked out from doing by having the parser in user space.
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
In reply to Alexander G. M. SmithQuoted 9 lines · Alexander G. M. Smith
However, one of my (unfinished) experiments was to have magic directories that show query results as their contents. One attribute of the directory (or even its name) would be the query string. That way even old software (like "ls") could use queries! Implementing queries-as-directories might require moving some things back into the kernel, or at least into some plug-in level.
- Alex
Symlinks also. Symlinks with powerful queries in them would require a parser in the kernel. Thanks for helping me to distill my incoherent reasons for the parser being in the kernel.
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
Quoted 2 lines · Hans Reiser
Symlinks also. Symlinks with powerful queries in them would require a parser in the kernel.
No they wouldn't. You can do symlinks with powerful queries in userspace _today_ (as well as directories which list queries).
Making queries be up to date in real-time is still a problem, but that has nothing to do with symlinks or directories, or where the parsers live.
Quoted 2 lines
Thanks for helping me to distill my incoherent reasons for the parser being in the kernel.
This is one occasion where you're mistaken :)
There may be other reasons for parsing query strings in the kernel (though I'm not convinced there are any), but this isn't one.
-- Jamie
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
In reply to Alexander G. M. SmithQuoted 1 line · Alexander G. M. Smith
Not only bloat, but time wasted reinventing the wheel. For my experimental file system (http://members.rogers.com/agmsbeos/AGMSRAMFileSystem.readme - see the Nifty Features chapter), I had to figure out the BFS query
I had a look. Cool stuff!
Quoted 1 line
I like that. Put the indexing and a related attribute change update notification mechanism into the kernel. User land libraries can build on that to implement whatever query language you want, thus saving work and having a common language for all file system varieties that support indices.
Yeah, thats basicly what I was thinking. Right now I'm trying to think
of any kind of filesystem that could support the general concept of "Fast Searching", but be somehow unable to export this capability as a set of indices on file attributes....
Ok. I give up. It seems like the right abstraction to me.
Quoted 5 lines
However, one of my (unfinished) experiments was to have magic directories that show query results as their contents. One attribute
of the directory (or even its name) would be the query string. That
way even old software (like "ls") could use queries! Implementing
queries-as-directories might require moving some things back into the
kernel, or at least into some plug-in level.
That is a pretty awesome idea. It should be done in its own specialized filesystem though. QueryFS. If the change-notification mechanism in the kernel was robust enough (a big if), the rest could be done with a userspace filesystem (via FUSE). Mount a query, cd into it, run grep, write a little bash script... Very unixy.
Signature · 2 lines
Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
Will Dyson wrote on Mon, 30 Aug 2004 21:57:17 -0400:
Quoted 1 line
I had a look. Cool stuff!
Thanks!
Quoted 5 lines
That is a pretty awesome idea. It should be done in its own specialized filesystem though. QueryFS. If the change-notification mechanism in the kernel was robust enough (a big if), the rest could be done with a userspace filesystem (via FUSE). Mount a query, cd into it, run grep, write a little bash script... Very unixy.
That brings up a good point, should the queries be allowed to run across file systems or be restricted to just one? BeOS was restricted to one file system (the query evaluation code was file system specific) and faked it for multiple ones at the user level by repeating the query on each FS. A separate Query FS wouldn't have that limit (or could fake it at the kernel level), if the kernel/FSs exported their indices and change notifications.
- Alex
Re: Separating Indexing and Searching (was silent semantic changes with reiser4)
Quoted 7 lines · Alexander G. M. Smith
That brings up a good point, should the queries be allowed to run across file systems or be restricted to just one? BeOS was restricted to one file system (the query evaluation code was file system specific) and faked it for multiple ones at the user level by repeating the query on each FS. A separate Query FS wouldn't have that limit (or could fake it at the kernel level), if the kernel/FSs exported their indices and change notifications.
I don't see any fundamental reason why filesystem boundaries couldn't be crossed. A separate Query FS could even fake it by scrubbing the disk with /usr/bin/find for filesystems that didn't export indices. Probably a bad idea, of course. But painfully slow execution is not a reason it _couldn't_ be done. Some people even like pain...
Signature · 2 lines
Will Dyson "Back off man, I'm a scientist!" -Dr. Peter Venkman
Quoted 1 line · Hans Reiser
Andrew Morton wrote:
[...]
Quoted 2 lines
Quoted 2 lines
The fact that one filesystem will offer features which other filesystems do not and cannot offer makes me queasy for some reason.
Not me. As long as it is clearly experimental stuff that can be removed at the head hacker's whim, that is. 2.7 material.
Quoted 2 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple,
Says who?
Quoted 2 lines
and that means we need to put search engine and database
functionality into the filesystem.
Please don't. Unix works and is extremely popular because it _doesn't_ try to be smart (policy vs mechanism distinction, simple abstractions that can be combined endlessly). If you add this to the filesystems, you either redo _all_ userland to understand _one_ particular way of doing "smart things" (which will turn out to be almost exactly the dumbest possible for some uses, and then you are stuck), or get lots of shards from broken apps (and users, and sysadmins).
Quoted 2 lines
It takes 11 years of serious
research to build a clean storage layer able to handle doing that.
Great! Build an experimental OS showing how to use it, and through that see if the ideas hold any water _in real, day-to-day, down-to-earth, practice_.
Quoted 2 lines
Reiser4 has done that, finally. None of the other Linux filesystems have.
How come nobody before you in the almost 30 years of Unix has ever seen the need for this indispensable feature?
Quoted 3 lines
The next major release of ReiserFS is going to be bursting with
semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites.
To me that would mean that ReiserFS has no place in Linux.
Quoted 2 lines
They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Maybe. But the question of it being of any use aren't trivially answered "yes". My gut feeling is that the answer is a resounding "no", but that's just me. Direcories are directories, if you want to ship directory-like stuff around, use directories (or tarfiles, or whatever). Just look what happened to the much, much easier stuff of splitting SUID/SGID into
capabilities: Nothing at all whatsoever, because they have no decent place to stay in the hallowed Unix APIs. Sure, Linux is now large enough to be able to _define_ APIs to follow, but even so it isn't at all easy to do so.
Quoted 3 lines
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards.
Why place a protective tower around the pit into which they are trying desperately to throw themselves? ;-)
Quoted 6 lines
Help me get the next level on the tower before
they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....
Better write libraries handling whatever weird format you have in mind for each use. Even applications. I don't expect to be able to use emacs to edit a JPEG or PostgreSQL database. Neither do I expect gimp to be able to edit a poem. The current trend (which I heartily agree with) is to take stuff _out_ of the kernel (for flexibility, access, development ease, even performance).
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 3 lines · Horst von Brand
Quoted 2 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple,
Says who?
People will say it when people stop using Linux on servers because they can integrate metadata easier in other operating systems ;)
Quoted 3 lines
Please don't. Unix works and is extremely popular because it _doesn't_ try to be smart (policy vs mechanism distinction, simple abstractions that can be combined endlessly). If you add this to the filesystems, you either redo
Just more moving little pieces to be combined endlessly.
I think it looks like Reiser4 semantics should go into VFS and not break legacy posix compatibility.
If you don't want to use a filesystem like that, don't. Maybe the reason Linux hasn't developed this yet is the fact that Linux supports n+1 file systems and above and beyond that many userspace ones. So there has been enough work in maintaining and competing the old ones and not coming up with new ones.
Quoted 4 lines
_all_ userland to understand _one_ particular way of doing "smart things" (which will turn out to be almost exactly the dumbest possible for some uses, and then you are stuck), or get lots of shards from broken apps (and users, and sysadmins).
This is a question if implementation.
What if the files-as-dirs have a ..metas/mainstream[1] file and are handled by legacy applications as directories? Nothing breaks, but may look a bit ugly. Nothing one line of shell scripting would not cure.
OTOH, the user space progs are quickly patched to support all this.
Quoted 2 lines
Great! Build an experimental OS showing how to use it, and through that see if the ideas hold any water
_inreal, day-to-day, down-to-earth,practice_.
Why should he?
Parts of Linux are already here and susceptible to experiments in evolution. (Break out 2.7 for this one, the people want code! :)
Quoted 2 lines
How come nobody before you in the almost 30 years of Unix has ever seen the need for this indispensable feature?
Lack of imagination?
Lack of need?
Lack of drive space?
And maybe someone did think among these lines back in the days, it's not like the current dogma of file systems is the only one that has ever been used.
Quoted 1 line
To me that would mean that ReiserFS has no place in Linux.
This is the type of argumentation I can not understand. Do you not have the freedom not to use it?
And this is not personal, but please say Reiser4, as ReiserFS is coupled with versions 3.x. They are quite different.
Quoted 2 lines
Maybe. But the question of it being of any use aren't trivially answered "yes". My gut feeling is that the answer is a resounding "no", but that's
I think it's a pretty big yes, even if the technical details do need to be clear before anything is set in stone. That's the reason for the on-going discussion.
Quoted 2 lines
just me. Direcories are directories, if you want to ship directory-like stuff around, use directories (or tarfiles, or whatever). Just look what
Without a common user-space API to deal in them. Oh, joy. Make the common user-space API? Will never happen.
Quoted 6 lines
Better write libraries handling whatever weird format you have in mind for each use. Even applications. I don't expect to be able to use emacs to edit a JPEG or PostgreSQL database. Neither do I expect gimp to be able to edit a poem. The current trend (which I heartily agree with) is to take stuff _out_ of the kernel (for flexibility, access, development ease, even performance).
I don't think anyone's talking about using emacs to edit a picture, but emacs could be used to edit the picture's description.[2] Maybe with some userspace-hook that exports the exif data via ..metas/ so the kernel won't have to parse it.
Linus wrote about why TCP is not in userspace and I think this is a similar situation. Technically. But not everything has to be in kernel space in Reiser4. Or that's what they say and I'm not sure where I stand on an exif parser in the kernel...
On the social side, I may be wrong in this, but not many userspace filesystems have the possibility of becoming a de-facto standard. One might say that's because they suck, or they suck because they're implemented in userspace or they are just met with prejudice for the same reason.
In the kernel something like this would have to be done right and people would put effort into doing it right.
I for one would welcome that.
[1] Sorry, guys, just had to use that name..
[2] You can edit a picture in emacs already, it's just prone to break ;)
Signature · 1 line
mjt
Quoted 3 lines · Markus Törnqvist
People will say it when people stop using Linux on servers because they can integrate metadata easier in other operating systems ;)
Heh. Considering that WinFS seems to be delayed yet more, I don't think that's a very strong argument.
Hell will freeze over before Microsoft does a filesystem right. Besides, WinFS is likely almost in user mode anyway, ie mostly a library, rather like the gnome people are already doing with nome storage.
So there's really no point in trying to push your agenda by trying to scare people with MS activities. Linux kernel developers do what's right because it is _right_, not because somebody else does it.
Linus
Quoted 6 lines · Markus Törnqvist
Quoted 3 lines
People will say it when people stop using Linux on servers because they can integrate metadata easier in other operating systems ;)
Quoted 6 lines
Heh. Considering that WinFS seems to be delayed yet more, I don't think that's a very strong argument.
Hell will freeze over before Microsoft does a filesystem right. Besides, WinFS is likely almost in user mode anyway, ie mostly a library, rather like the gnome people are already doing with nome storage.
Yes, it is mostly in user land. But, It is still integrated with the Windows API. This means that normal programs that use the Windows API will be able to use most of the new features (like displaying thumbnails, filtered views, etc when you do file operations)
Besides, NTFS is not that bad. It does have both encryption and compression and a big set of ACL features that aren't in most Linux filesystems today.
Quoted 3 lines
So there's really no point in trying to push your agenda by trying to scare people with MS activities. Linux kernel developers do what's right because it is _right_, not because somebody else does it.
I agree. Things should be done because they are good, not because you are threatened to.
It is a shame really that so many people hate Microsoft (or Apple) so much they fail to see things that actually are good.
Quoted 1 line
Linus
Quoted 3 lines · Linus Torvalds
Heh. Considering that WinFS seems to be delayed yet more, I don't think that's a very strong argument.
But there's Mac OS and isn't Solaris doing something along these lines?
Microsoft isn't alone there ;)
Quoted 2 lines
scare people with MS activities. Linux kernel developers do what's right because it is _right_, not because somebody else does it.
Never really doubted that, mind you.
I just think this is both right and a competition situation.
Signature · 1 line
mjt
Quoted 2 lines · Linus Torvalds
Heh. Considering that WinFS seems to be delayed yet more, I don't think that's a very strong argument.
Which is another argument, and bragging rights, to integrate something like Reiser FS4. :)
Quoted 3 lines
Hell will freeze over before Microsoft does a filesystem right. Besides, WinFS is likely almost in user mode anyway, ie mostly a library, rather like the gnome people are already doing with nome storage.
They're trying to push their low level storage model into the kernel after they saw how slow their userspace version of that is. It makes sense to have this kind of stuff directly apart of a lower level FS later
Quoted 3 lines
So there's really no point in trying to push your agenda by trying to scare people with MS activities. Linux kernel developers do what's right because it is _right_, not because somebody else does it.
I tried to stay out of this thread, but I couldn't resist after this post. :) MS has other problems, namely, they're a large company trying to basically replicated Apple's (NeXT) OS X stuff, but onl 10x larger and slower than it is. It's really silly what's going on with MS development as well as the greater open source X community. The sooner folks realize that all rendering models are moving in the direction of Apple's OS X, the sooner they can just flat out rip it off.
It's going to require both kernel and userspace changes for this to happen.
bill
Quoted 10 lines · Linus Torvalds
Quoted 4 lines · Markus Törnqvist
People will say it when people stop using Linux on servers because they can integrate metadata easier in other operating systems ;)
Heh. Considering that WinFS seems to be delayed yet more, I don't think that's a very strong argument.
Quoted 11 lines
Hell will freeze over before Microsoft does a filesystem right. Besides, WinFS is likely almost in user mode anyway, ie mostly a library, rather like the gnome people are already doing with nome storage.
So there's really no point in trying to push your agenda by trying to scare people with MS activities. Linux kernel developers do what's right because it is _right_, not because somebody else does it.
Linus
Apple will get it right. I promise it. I have met Dominic, and he is very very sharp. Look at the Tiger demos on their website. Simple interface, looks nice to me....
The one area he might screw up is performance, but I don't care to count on that.
WinFS first tried to put it all in the FS, and then it became a user mode library almost certainly because they are making the standard mistakes the database guys make when they try to emulate file systems without changing the core balanced tree algorithms, and their performance sucked and they had to back off. It took 11 years for me to get it right, and they aren't as crazy-err-persistent as I am.;-)
We might get lucky and have them produce another NTFS, but then again, when Microsoft focuses on a task, they do much better at it than they do most of the time, and they are focused on WinFS. They have hired very sharp people. We can hope that they don't know how to use them, but when they hire people like Gerard Salton for $1 million a year, there is just possibly a chance that they might try to get their money's worth out of him.
You should not be complacent about WinFS being delayed to 2007, because even if I get funding for enhanced ReiserFS semantics tomorrow we also can't get the job done before 2007. This is big science, not writing a device driver.
Finally, how much harm will it be if we do it right and it is important and they fail? Suppose I am wrong about them, and we create a powerful unifying namespace for Linux before any other OS does? Is that so bad?
Creating a powerful namespace at the heart of Linux is the most important enhancement you can make to the OS.
Finally the storage layer is good enough to support putting the relationship between keywords (actually keyobjects in my scheme....) and their documents directly into the FS without losing performance for traditional file system usage patterns, and I get to stop tweaking performance and go have fun with semantics in the next major release.
Hans
Quoted 5 lines · Hans Reiser
mistakes the database guys make when they try to emulate file systems without changing the core balanced tree algorithms, and their performance sucked and they had to back off. It took 11 years for me to get it right, and they aren't as crazy-err-persistent as I am.;-)
Quoted 7 lines
We might get lucky and have them produce another NTFS, but then again, when Microsoft focuses on a task, they do much better at it than they do most of the time, and they are focused on WinFS. They have hired very sharp people. We can hope that they don't know how to use them, but when they hire people like Gerard Salton for $1 million a year, there is just possibly a chance that they might try to get their money's worth out of him.
I realize this is a relatively late reply, but...
MS's problem is that they hire very smart folks, but the compartimentalize them so they don't influence the overall architecture of the entire system. I guarantee you that even if they did get all of this in place and working, their arrogance in this matter will screw up how this will be properly used and never expressed the power of a system like this.
Apple is another story. They're the only other folks that might get this right.
Your system is a dream of mine since I was dorking around with persistent objects in Smalltalk systems. But getting other folks to understand something like this and then use it in this way is very difficult and I don't expect MS to be able to do this nor get .NET to compete with Java for server side applications. I don't expect traditional Unix folks to understand why something like this is important also.
It's not about a single technology as much as the system as a whole, larger picture... That's were a system starts to show it's superiority.
That's my two cents on the matter.
bill
Quoted 9 lines
Quoted 1 line · Hans Reiser
Andrew Morton wrote:
[...]
Quoted 2 lines
Quoted 2 lines
The fact that one filesystem will offer features which other filesystems do not and cannot offer makes me queasy for some reason.
Quoted 7 lines
Not me. As long as it is clearly experimental stuff that can be removed at the head hacker's whim, that is. 2.7 material.
Quoted 2 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple,
Says who?
At least I as a user see the benefits largely. The workstation / desktop user has much more need for such features, than perhaps the normal Linux sysadmin.
Quoted 10 lines
Quoted 2 lines
and that means we need to put search engine and database
functionality into the filesystem.Please don't. Unix works and is extremely popular because it _doesn't_ try to be smart (policy vs mechanism distinction, simple abstractions that can be combined endlessly). If you add this to the filesystems, you either redo _all_ userland to understand _one_ particular way of doing "smart things" (which will turn out to be almost exactly the dumbest possible for some uses, and then you are stuck), or get lots of shards from broken apps (and users, and sysadmins).
Indeed. But you forget one thing. Combining lots of small userland tools can actually make things more complex - at least for the user.
That said, I do not see that anyone has suggested to remove this way of working with applications.
Are the new and old features mutually exclusive?
Quoted 5 lines
Quoted 2 lines
It takes 11 years of serious
research to build a clean storage layer able to handle doing that.Great! Build an experimental OS showing how to use it, and through that see if the ideas hold any water
_inreal, day-to-day, down-to-earth,practice_.
There are many uses already. It could be encryption, compression, meta-data, file streams, sorting, searching and a multitude of uses and ideas that haven't been discovered yet.
Quoted 5 lines
Quoted 2 lines
Reiser4 has done that, finally. None of the other Linux filesystems have.
How come nobody before you in the almost 30 years of Unix has ever seen the need for this indispensable feature?
I, as a user, have for a long time. Do not drag everyone over the same edge. Users have different needs. We should try to be as forthcoming as possible to provide the tools and options for them.
Quoted 5 lines
Quoted 3 lines
The next major release of ReiserFS is going to be bursting with
semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites.To me that would mean that ReiserFS has no place in Linux.
Why do you say this? I thought Linux embraced advancements and new technologies.
Quoted 11 lines
Quoted 2 lines
They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Maybe. But the question of it being of any use aren't trivially answered "yes". My gut feeling is that the answer is a resounding "no", but that's just me. Direcories are directories, if you want to ship directory-like stuff around, use directories (or tarfiles, or whatever). Just look what happened to the much, much easier stuff of splitting SUID/SGID into
capabilities: Nothing at all whatsoever, because they have no decent place to stay in the hallowed Unix APIs. Sure, Linux is now large enough to be able to _define_ APIs to follow, but even so it isn't at all easy to do so.
Exactly. The problem I see in this discussion is the lack of just this - APIs. Because the lack of good APIs we cannot make any larger changes or bring new features because old applications will break.
I think that Linux should make new API that will completely separate applications from the storage media. This way we will not as easily break applications when new features are developed. This should be the main priority.
Perhaps over a transition period the old ways will be allowed while applications are ported to the new APIs. The change is certainly going to be needed at one point or Linux won't be able to evolve as quickly as its users are demanding it.
Application breakage has happened before between virtually every kernel change. It isn't new. Just take devfs and sysfs.
Quoted 6 lines
Quoted 3 lines
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards.
Why place a protective tower around the pit into which they are trying desperately to throw themselves? ;-)
It is easy to say this. But the fact is that users can actually use these new features for good things.
Quoted 7 lines
Quoted 6 lines
Help me get the next level on the tower before
they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....
Quoted 6 lines
Better write libraries handling whatever weird format you have in mind for each use. Even applications. I don't expect to be able to use emacs to edit a JPEG or PostgreSQL database. Neither do I expect gimp to be able to edit a poem. The current trend (which I heartily agree with) is to take stuff _out_ of the kernel (for flexibility, access, development ease, even performance).
If I want to be able to quickly find files by a certain author I
could search the meta-data fields (if they are used) with normal
tools such as grep.
Compression or encryption is another example.
Would you rather patch every application there is for Linux to enable support for reading these files and directories?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines
Quoted 3 lines · Spam
Quoted 2 lines · Horst von Brand
Quoted 1 line · Hans Reiser
Andrew Morton wrote:
[...]
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple,
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Says who?
At least I as a user see the benefits largely. The workstation / desktop user has much more need for such features, than perhaps the normal Linux sysadmin.
Show benefits, show there are no downsides. Show that the same can't possibly be done in userland. Then I'll consider buying it.
I am not saying it couldn't be done in userland. Most things can.
The problem with userland is that it doesn't provide generic access across most applications. For example GnomeVFS is limited to Gnome applications only. The same for KDE. to be able to coordinate application developer on anything is just almost impossible.
Still. Why do you oppose plugins, streams and meta files? The could
be valuable and easy to use tools for many purposes. One could
be would be advanced ACLs defined as a meta-file using XML format.
Quoted 11 lines
AFAICS: Smallish benefits for some narrow application niche. Mayor problems (no decent multiuser way of using it, extremely complex stuff placed in the kernel). Userland solutions are all around us right now, and work just fine. No, placing the same gunk in the kernel won't make it magically use no time or memory, more like exactly the opposite. Besides, all the visions waved around here have very little in common (except the idea that they make all restrictions magically dissapear).
Get a list of required features, show concrete ways of using it, outline possible implementations, discuss resource usage. I.e., do "engineering". Then we have something to discuss.
I am not sure what you refer to as "required features". Do you mean example of usage and contents for streams, plugins and meta files?
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
and that means we need to put search engine and database
functionality into the filesystem.Please don't. Unix works and is extremely popular because it _doesn't_ try to be smart (policy vs mechanism distinction, simple abstractions that can be combined endlessly). If you add this to the filesystems, you either redo _all_ userland to understand _one_ particular way of doing "smart things" (which will turn out to be almost exactly the dumbest possible for some uses, and then you are stuck), or get lots of shards from broken apps (and users, and sysadmins).
Quoted 5 lines
Quoted 2 lines
Indeed. But you forget one thing. Combining lots of small userland tools can actually make things more complex - at least for the user.
So? Placing lots of little things in kernel does the same, plus screws over sysadmins, and makes kernel hacker's job harder. I prefer the former alone.
Difference being that it could be transparent in a way otherwise not possible.
Quoted 45 lines
Quoted 2 lines
That said, I do not see that anyone has suggested to remove this way of working with applications.
Excuse me, if files suddenly become directories, and you can't have some "reserved" file/directory names, and... you are breaking lots of stuff.
Quoted 1 line
Are the new and old features mutually exclusive?
Yep.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
It takes 11 years of serious
research to build a clean storage layer able to handle doing that.Great! Build an experimental OS showing how to use it, and through that see if the ideas hold any water
_inreal, day-to-day, down-to-earth,practice_.There are many uses already.
Where?
Quoted 3 lines
It could be encryption, compression,
meta-data, file streams, sorting, searching and a multitude of uses and ideas that haven't been discovered yet."Could", "multitude ... haven't been discovered yet" is _not_ "many current uses".
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Reiser4 has done that, finally. None of the other Linux filesystems have.
How come nobody before you in the almost 30 years of Unix has ever seen the need for this indispensable feature?
I, as a user, have for a long time. Do not drag everyone over the same edge. Users have different needs. We should try to be as forthcoming as possible to provide the tools and options for them.
Why? Breaking the basic paradigms for some user whim is not good OS design in my book, sorry. Many "bright ideas" have been thrown out over the years for just the same reasons.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The next major release of ReiserFS is going to be bursting with
semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
To me that would mean that ReiserFS has no place in Linux.
Why do you say this? I thought Linux embraced advancements and new technologies.
If they are right. I think breaking the base of the OS is not a good idea. Perhaps ReiserFS has a place elsewhere (in MacOS, or Windows, where this is supposedly so so badly needed?), but not here.
You mean in Windows and MacOS where much of this functionality already exists?
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Maybe. But the question of it being of any use aren't trivially answered "yes". My gut feeling is that the answer is a resounding "no", but that's just me. Direcories are directories, if you want to ship directory-like stuff around, use directories (or tarfiles, or whatever). Just look what happened to the much, much easier stuff of splitting SUID/SGID into
capabilities: Nothing at all whatsoever, because they have no decent place to stay in the hallowed Unix APIs. Sure, Linux is now large enough to be able to _define_ APIs to follow, but even so it isn't at all easy to do so.
Quoted 3 lines
Quoted 3 lines
Exactly. The problem I see in this discussion is the lack of just this - APIs. Because the lack of good APIs we cannot make any larger changes or bring new features because old applications will break.
I'll chop this up...
Quoted 3 lines
No. There is a complete lack of answers to why it should be done ("I think it would be nice", "MSFT is trying to do it", "Look at MacOS" is far from enough)
No perhaps not by itself. But it certainly should be considered.
These two OS'es have most of the market share. They have great resources trying to make things that work for their users.
Users are more important than you think. Linux and any OS can do what it wants, but if it wants to keep users then it has to listen to them.
Quoted 3 lines
, on what the alternatives are ("Sorry, it must be in the kernel because it is impossible to get application writers to agree on how to do it"
This is a perfectly valid reason. If it is necessary to move something into the core of Linux because it couldn't otherwise be done then it should seriously be considered.
Quoted 2 lines
will just add another incompatible way of "doing almost the same", this
time in the kernel),
People on this list are actually trying to make it to be fully compatible with old legacy applications.
If you hadn't noticed, Reiser4 does work. The meta files do work. The discussion is wether parts of Reiser4 should be made generic and fit into the VFS.
Quoted 4 lines
and last but not least what the impact is (performance
wise, application breakage, user/sysadmin expectation breakage, incompatibility with other systems, kernel development impact, to list a few). Hash this out, and we can talk.
You paint up a doomsday picture here. Nothing of this magnitude has happened and won't. besides, what is wrong if sysadmins would have to learn something new?
Quoted 9 lines
Quoted 4 lines
I think that Linux should make new API that will completely separate applications from the storage media. This way we will not as easily break applications when new features are developed. This should be the main priority.
The "files + directories" stuff is a nice abstraction, and works today on all random-access storage media. You don't care much if it is on a CD, a floppy, a disk, a RAID array, or a flash card, do you? It won't work on tapes, or printers; but that is to be expected.
you didn't actually comment on what I said. I mentioned API's nothing about directories and files. API being the keyword here.
If there are good API's that applications can use, for example to access filesystems, then it will be easier and much more possible to introduce new things into the filesystem without breaking existing applications. One example of preventing application breakage could
be to have a versioning system. Applications could query which
version is supported, or vice versa.
From what I understand it is much harder to do anything today because of the fixed ways. This is why we have this discussion.
Quoted 8 lines
[...]
Quoted 2 lines
Application breakage has happened before between virtually every kernel change. It isn't new. Just take devfs and sysfs.
Oops, now emacs stopped working because devfs was added? gcc needed a mayor overhaul because of /sys vs /proc? Gimme a break. That was
_basicsystemtool_breakage, not all-around application breakage.
Emacs seem to work fine with the file-as-dir on my Reiser4 partition. And so does actually any other application I have used on it. Be it in Gnome, KDE or in plain shell's.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why place a protective tower around the pit into which they are trying desperately to throw themselves? ;-)
It is easy to say this. But the fact is that users can actually use these new features for good things.
And can abuse them for bad things, and the features aren't free. Balance benefits (very minor) against costs (quite large).
Abuse depends on permissions and security policies which is your job as admin to look after.
It would be possible to limit, for example), the types of plugins that a user can either use or load.
Do you give your users access to modprobe or tools like that?
Quoted 14 lines
Quoted 13 lines
Quoted 13 lines
Quoted 6 lines
Help me get the next level on the tower before
they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....Better write libraries handling whatever weird format you have in mind for each use. Even applications. I don't expect to be able to use emacs to edit a JPEG or PostgreSQL database. Neither do I expect gimp to be able to edit a poem. The current trend (which I heartily agree with) is to take stuff _out_ of the kernel (for flexibility, access, development ease, even performance).
Quoted 6 lines
Quoted 3 lines
If I want to be able to quickly find files by a certain author I
could search the meta-data fields (if they are used) with normal
tools such as grep.Iff the metadata is there. It won't (everybody would have to agree on placing that on the files for it to work), so it is useless.
No it is not useless. It just means the file has no meta information. Just as it is today. No change.
Quoted 11 lines
Quoted 4 lines
Compression or encryption is another example.
Would you rather patch every application there is for Linux to enable support for reading these files and directories?
No. But an encrypted or compressed filessytem doesn't need weird files. Easiest on applications is just to serve the decrypted/uncompressed files for use via the traditional APIs. Next easiest is provide programs that handle cryptography and compression and can be combined with whatever unaware program you care to use. Funny, that is exactly the way things work now...
So you can setup a directory that has some files compressed and some other encrypted and yet they will be available to use with tar, cp, ls, mc, Nautilus, Emacs etc etc?
Quoted 3 lines · Spam
Quoted 3 lines
Quoted 1 line · Spam
Horst von Brand <[email protected]> said:
[...]
Quoted 10 lines
Quoted 3 lines
Show benefits, show there are no downsides. Show that the same can't possibly be done in userland. Then I'll consider buying it.
I am not saying it couldn't be done in userland. Most things can.
The problem with userland is that it doesn't provide generic access across most applications. For example GnomeVFS is limited to Gnome applications only. The same for KDE. to be able to coordinate application developer on anything is just almost impossible.
Hmm... drag-and-drop also doesn't work constently over all applications. Let's put it into kernel.
Seriously, kernel prformance is critical to the system, and to achieve high performance all kernel code runs in single address space (actually, in portion of address spaces of user processes shared by all processes). All shared system state is located there. This means that bug in a kernel affects whole system. This means that kernel should be kept as simple as possible (and a bit more simple).
This is why only things that cannot be done efficiently in the user level are put into kernel. And political agendas of various camps of user-level developers change nothing here.
Quoted 4 lines
Still. Why do you oppose plugins, streams and meta files? The could
be valuable and easy to use tools for many purposes. One could
be would be advanced ACLs defined as a meta-file using XML format.
POSIX has standard ACL API in C (well, "eternal draft" only), one can use it to extract ACLs from kernel and convert it to any format to one's heart content. Advantage of this is that when XML goes out of fashion (I hope this wouldn't yet happen when you will read this message), kernel API will remain intact.
Quoted 1 line
Nikita.
[ This will probably go down in history as the most pointless message
ever, I just told Nik on IRC I'd take it up on the list :) ]
Quoted 4 lines · Nikita Danilov
Spam writes:
Hmm... drag-and-drop also doesn't work constently over all applications. Let's put it into kernel.
What I'm after is that the file system should be able to store any arbitrary metadata. No matter what the format is.
Maybe I was a bit harsh on XML in my previous email, but whatever.
Quoted 6 lines
Seriously, kernel prformance is critical to the system, and to achieve high performance all kernel code runs in single address space (actually, in portion of address spaces of user processes shared by all processes). All shared system state is located there. This means that bug in a kernel affects whole system. This means that kernel should be kept as simple as possible (and a bit more simple).
I do agree here. But is it seriously such a big issue to implement the files-as-dirs kind of thing?
Be it overloading MAY_READ so it works with chdir or implementing openat or whatever it takes.
I don't think this should be much more, if any more, than the capability to store this data. Which Reiser4 does. But moved from the Reiser4 level to the VFS level. Right?
Quoted 3 lines
This is why only things that cannot be done efficiently in the user level are put into kernel. And political agendas of various camps of user-level developers change nothing here.
What I'd want to do is to be able to write a Reiser4 plugin that suits my needs for something. Not that I'd even know how to, but that's a matter of time.
Are there other means of doing this than Reiser? I mean Reiser4 plugin functionality by other means.
Quoted 8 lines
Quoted 3 lines
Still. Why do you oppose plugins, streams and meta files? The could
be valuable and easy to use tools for many purposes. One could
be would be advanced ACLs defined as a meta-file using XML format.POSIX has standard ACL API in C (well, "eternal draft" only), one can use it to extract ACLs from kernel and convert it to any format to one's heart content. Advantage of this is that when XML goes out of fashion (I hope this wouldn't yet happen when you will read this message), kernel API will remain intact.
Aa, this apparently is an argument against XML parsing in the kernel, not the idea that if someone wanted ACLs, that are in XML format, and could not use them (because the kernel doesn't parse), he should be able to write such a plugin.
Besides, let's say the Reiser4 XML-ACL plugin has a parser that actually DOES something. For argument's sake. Would it not be up to the individual user to disable this plugin? I'd assume it's possible to write plugins so that they do not affect anything but themselves, meaning this parser.
Of course the problem of copying a file with XML-ACLs to another Reiser4 fs without support for them should be thought of. But I guess this is where you take the shortest route; the XML-ACL files are intact in the file's metadata, but totally unusable?
Signature · 1 line
mjt
Quoted 13 lines
Quoted 3 lines · Spam
Quoted 2 lines · Horst von Brand
Quoted 1 line · Hans Reiser
Andrew Morton wrote:
[...]
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Andrew, we need to compete with WinFS and Dominic Giampaolo's filesystem for Apple,
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Says who?
At least I as a user see the benefits largely. The workstation / desktop user has much more need for such features, than perhaps the normal Linux sysadmin.
Show benefits, show there are no downsides. Show that the same can't possibly be done in userland. Then I'll consider buying it.
I am not saying it couldn't be done in userland. Most things can.
The problem with userland is that it doesn't provide generic access across most applications. For example GnomeVFS is limited to Gnome applications only. The same for KDE. to be able to coordinate application developer on anything is just almost impossible.
Still. Why do you oppose plugins, streams and meta files? The could
be valuable and easy to use tools for many purposes. One could
be would be advanced ACLs defined as a meta-file using XML format.
Quoted 11 lines
AFAICS: Smallish benefits for some narrow application niche. Mayor problems (no decent multiuser way of using it, extremely complex stuff placed in the kernel). Userland solutions are all around us right now, and work just fine. No, placing the same gunk in the kernel won't make it magically use no time or memory, more like exactly the opposite. Besides, all the visions waved around here have very little in common (except the idea that they make all restrictions magically dissapear).
Get a list of required features, show concrete ways of using it, outline possible implementations, discuss resource usage. I.e., do "engineering". Then we have something to discuss.
I am not sure what you refer to as "required features". Do you mean example of usage and contents for streams, plugins and meta files?
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
and that means we need to put search engine and database
functionality into the filesystem.Please don't. Unix works and is extremely popular because it _doesn't_ try to be smart (policy vs mechanism distinction, simple abstractions that can be combined endlessly). If you add this to the filesystems, you either redo _all_ userland to understand _one_ particular way of doing "smart things" (which will turn out to be almost exactly the dumbest possible for some uses, and then you are stuck), or get lots of shards from broken apps (and users, and sysadmins).
Quoted 5 lines
Quoted 2 lines
Indeed. But you forget one thing. Combining lots of small userland tools can actually make things more complex - at least for the user.
So? Placing lots of little things in kernel does the same, plus screws over sysadmins, and makes kernel hacker's job harder. I prefer the former alone.
Difference being that it could be transparent in a way otherwise not possible.
Quoted 45 lines
Quoted 2 lines
That said, I do not see that anyone has suggested to remove this way of working with applications.
Excuse me, if files suddenly become directories, and you can't have some "reserved" file/directory names, and... you are breaking lots of stuff.
Quoted 1 line
Are the new and old features mutually exclusive?
Yep.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
It takes 11 years of serious
research to build a clean storage layer able to handle doing that.Great! Build an experimental OS showing how to use it, and through that see if the ideas hold any water
_inreal, day-to-day, down-to-earth,practice_.There are many uses already.
Where?
Quoted 3 lines
It could be encryption, compression,
meta-data, file streams, sorting, searching and a multitude of uses and ideas that haven't been discovered yet."Could", "multitude ... haven't been discovered yet" is _not_ "many current uses".
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Reiser4 has done that, finally. None of the other Linux filesystems have.
How come nobody before you in the almost 30 years of Unix has ever seen the need for this indispensable feature?
I, as a user, have for a long time. Do not drag everyone over the same edge. Users have different needs. We should try to be as forthcoming as possible to provide the tools and options for them.
Why? Breaking the basic paradigms for some user whim is not good OS design in my book, sorry. Many "bright ideas" have been thrown out over the years for just the same reasons.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The next major release of ReiserFS is going to be bursting with
semantic enhancements, because the prerequisites for them are in place now. None of the other Linux filesystems have those prerequisites.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
To me that would mean that ReiserFS has no place in Linux.
Why do you say this? I thought Linux embraced advancements and new technologies.
If they are right. I think breaking the base of the OS is not a good idea. Perhaps ReiserFS has a place elsewhere (in MacOS, or Windows, where this is supposedly so so badly needed?), but not here.
You mean in Windows and MacOS where much of this functionality already exists?
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
They won't be able to keep up with the semantic enhancements. This metafiles and file-directories stuff is actually fairly trivial stuff.
Maybe. But the question of it being of any use aren't trivially answered "yes". My gut feeling is that the answer is a resounding "no", but that's just me. Direcories are directories, if you want to ship directory-like stuff around, use directories (or tarfiles, or whatever). Just look what happened to the much, much easier stuff of splitting SUID/SGID into
capabilities: Nothing at all whatsoever, because they have no decent place to stay in the hallowed Unix APIs. Sure, Linux is now large enough to be able to _define_ APIs to follow, but even so it isn't at all easy to do so.
Quoted 3 lines
Quoted 3 lines
Exactly. The problem I see in this discussion is the lack of just this - APIs. Because the lack of good APIs we cannot make any larger changes or bring new features because old applications will break.
I'll chop this up...
Quoted 3 lines
No. There is a complete lack of answers to why it should be done ("I think it would be nice", "MSFT is trying to do it", "Look at MacOS" is far from enough)
No perhaps not by itself. But it certainly should be considered.
These two OS'es have most of the market share. They have great resources trying to make things that work for their users.
Users are more important than you think. Linux and any OS can do what it wants, but if it wants to keep users then it has to listen to them.
Quoted 3 lines
, on what the alternatives are ("Sorry, it must be in the kernel because it is impossible to get application writers to agree on how to do it"
This is a perfectly valid reason. If it is necessary to move something into the core of Linux because it couldn't otherwise be done then it should seriously be considered.
Quoted 2 lines
will just add another incompatible way of "doing almost the same", this
time in the kernel),
People on this list are actually trying to make it to be fully compatible with old legacy applications.
If you hadn't noticed, Reiser4 does work. The meta files do work. The discussion is wether parts of Reiser4 should be made generic and fit into the VFS.
Quoted 4 lines
and last but not least what the impact is (performance
wise, application breakage, user/sysadmin expectation breakage, incompatibility with other systems, kernel development impact, to list a few). Hash this out, and we can talk.
You paint up a doomsday picture here. Nothing of this magnitude has happened and won't. besides, what is wrong if sysadmins would have to learn something new?
Quoted 9 lines
Quoted 4 lines
I think that Linux should make new API that will completely separate applications from the storage media. This way we will not as easily break applications when new features are developed. This should be the main priority.
The "files + directories" stuff is a nice abstraction, and works today on all random-access storage media. You don't care much if it is on a CD, a floppy, a disk, a RAID array, or a flash card, do you? It won't work on tapes, or printers; but that is to be expected.
you didn't actually comment on what I said. I mentioned API's nothing about directories and files. API being the keyword here.
If there are good API's that applications can use, for example to access filesystems, then it will be easier and much more possible to introduce new things into the filesystem without breaking existing applications. One example of preventing application breakage could
be to have a versioning system. Applications could query which
version is supported, or vice versa.
From what I understand it is much harder to do anything today because of the fixed ways. This is why we have this discussion.
Quoted 8 lines
[...]
Quoted 2 lines
Application breakage has happened before between virtually every kernel change. It isn't new. Just take devfs and sysfs.
Oops, now emacs stopped working because devfs was added? gcc needed a mayor overhaul because of /sys vs /proc? Gimme a break. That was
_basicsystemtool_breakage, not all-around application breakage.
Emacs seem to work fine with the file-as-dir on my Reiser4 partition. And so does actually any other application I have used on it. Be it in Gnome, KDE or in plain shell's.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Look guys, in 1993 I anticipated the battle would be here, and I build the foundation for a defensive tower right at the spot MS and Apple are now maneuvering towards.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why place a protective tower around the pit into which they are trying desperately to throw themselves? ;-)
It is easy to say this. But the fact is that users can actually use these new features for good things.
And can abuse them for bad things, and the features aren't free. Balance benefits (very minor) against costs (quite large).
Abuse depends on permissions and security policies which is your job as admin to look after.
It would be possible to limit, for example), the types of plugins that a user can either use or load.
Do you give your users access to modprobe or tools like that?
Quoted 14 lines
Quoted 13 lines
Quoted 13 lines
Quoted 6 lines
Help me get the next level on the tower before
they get here. It is one hell of a foundation, they won't be able to shake it, their trees are not as powerful. Don't move reiser4 into vfs, use reiser4 as the vfs. Don't write filesystems, write file plugins and disk format plugins and all the other kinds of plugins, and you won't be missing any expressive power that you really want....Better write libraries handling whatever weird format you have in mind for each use. Even applications. I don't expect to be able to use emacs to edit a JPEG or PostgreSQL database. Neither do I expect gimp to be able to edit a poem. The current trend (which I heartily agree with) is to take stuff _out_ of the kernel (for flexibility, access, development ease, even performance).
Quoted 6 lines
Quoted 3 lines
If I want to be able to quickly find files by a certain author I
could search the meta-data fields (if they are used) with normal
tools such as grep.Iff the metadata is there. It won't (everybody would have to agree on placing that on the files for it to work), so it is useless.
No it is not useless. It just means the file has no meta information. Just as it is today. No change.
Quoted 11 lines
Quoted 4 lines
Compression or encryption is another example.
Would you rather patch every application there is for Linux to enable support for reading these files and directories?
No. But an encrypted or compressed filessytem doesn't need weird files. Easiest on applications is just to serve the decrypted/uncompressed files for use via the traditional APIs. Next easiest is provide programs that handle cryptography and compression and can be combined with whatever unaware program you care to use. Funny, that is exactly the way things work now...
So you can setup a directory that has some files compressed and some other encrypted and yet they will be available to use with tar, cp, ls, mc, Nautilus, Emacs etc etc?