Subject: Re: CVS commit: src
To: Reinoud Zandijk <reinoud@netbsd.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 06/28/2005 10:54:34
On Jun 28, 2005, at 6:28 AM, Reinoud Zandijk wrote:

> yup...  though i have a similar naming problem as has HFS+. On UDF  
> a file
> can have an associated streamdir with it basicly turning it into a
> composite of a file and a directory with named streams. Directories  
> though
> can also have an associated streamdir with it. (!)

Yah, this is done in Mac OS X on HFS+ file systems like so:

     /path/to/regular/file
     /path/to/regular/file/..namedfork/data    <- equivalent to first  
example
     /path/to/regular/file/..namedfork/rsrc    <- Mac OS X "resource  
fork"

This is handled by the HFS+-specific lookup routine.

> To fit those two concepts into the Unix filingsystem is a bit  
> tricky since
> VFS doesn't understand this concept too well. HFS+ has some similar  
> issues
> so maybe it would be good to think of a way of adressing such named  
> streams
> and the file's associated attributes. The chflags(1) interface is the
> closest matching interface but far too limited.

It should be pretty straight-forward to encapsulate this type of sub- 
file handling into the file system itself... OTOH, it might map  
pretty well to what Gordon wants with openat() and friends.

> Luckily, in UDF named streams are not allowed to have subdirectries.

I don't think any file system that supports sub-files allows sub-sub- 
files.

-- thorpej