Ok, I'm trying to implement streams in UDF.
They are kind of like resource forks/extended attributes.

Anyways, how they work is a inode has a pointer to a streams directory,
which contains all the streams for the inode as files in the directory.

So like:

FILE ---> stream dir
               Stream 1
               Stream 2

etc.

The first thing I tried was adding lookup and readdir to the file function
table and have the functions work on stream dir.

In theory, I thought this would work (*heh*) but I couldn't get ls to
display the directory contents of a file (small wonder).

My first question is, CAN I actually use lookup and readdir on a file
(Is it ls being too smart by looking at the thing, deceiding its not a
directory, and giving up -- or is it the kernel?)

Second, I tried having lookup do a second pass through the directory
when the file being looked up contain a special string (like file#STREAM)
or (.file) and have it d_add the stream dir to the directory where file
was in.. This seemed to work just fine, but I was wondering how immoral
doing something like this was :)

Anyways, if anyone has some thoughts, let me know..
(This is mostly for read access, or at most writing for testing. Not for
real use.)

I could use ioctl's to access the stuff, but since its layed out just
like any other directory I thought using the routines provided was smarter :)

Ben

-- 
Linux UDF - http://www.trylinux.com/projects/udf/index.html
Latest Is - udf-0.9.1 (http://www.csc.calpoly.edu/~bfennema/udf.html)

Reply via email to