lkml.org 
[lkml]   [2000]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NTFS-like streams?
rothwell@flyingbuttmonkeys.com (Michael Rothwell)  wrote on 12.08.00 in <3995B6DB.12DE8038@flyingbuttmonkeys.com>:

> Linus Torvalds wrote:

> > This is a practical matter of "how do we sanely export non-UNIX semantics
> > of other systems filesystems to UNIX programs".
>
> Along those lines, I originally mentioned that
> there are two ways to access the data; the Mac
> and BeOS both require use of special functions to
> manipulate extended attributes as name-value pairs.
> NTFS allows streams to be used as regular files:
> open, seek, read, close, etc.

This is not quite correct wrt. Mac. (And I think in a rather important way
for this discussion.)

You see, the Mac *does* support handling the resource fork as a stream
(fully generic, with lseek() and everything). (The Resource Manager is, in
effect, a user space library sitting on top of this model.)

You just need a different open() function. (Well, there are a number of
quirks here, too, but I won't go into them.)

Another thing of note is that the Resource Manager namespace is actually
structured.

Every resource has a type (4 characters), a number (16 bits IIRC), and a
name; the (type, number) tuple must be unique, I don't recall if (type,
name) must also be unique. And the accessor routines essentially handle
the type as if it were a directory.

Who said that subdirectories in meta data don't make sense?

>It seems to me that
> the NTFS method is actually more Unix-like, and can
> be used as the basis for providing BeOS-type
> functionality -- all the accessor functions have
> to do is open teh stream file, write a blob to it,
> and close it again.

In MacOS, you have the stream, and the Resource Manager data structure on
top of that, and you can deal with interesting stuff like when to do
garbage collection on the whole mess. Oh, and modern versions can do some
sort of compression on resources, but *not* via Resource Manager routines
- you need a program accessing the raw stream to do that. The RM can only
decompress.

MfG Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.238 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site