[Samba] Support for multiple file streams?

James Peach jpeach at samba.org
Mon Jul 2 17:27:42 GMT 2007

On Jul 2, 2007, at 9:53 AM, Jeremy Allison wrote:

> On Mon, Jul 02, 2007 at 04:50:54PM +0000, simo wrote:
>> I was thinking if it couldn't be better to use just one directory  
>> in the
>> root of the filesystem and within it create a directory for each file
>> where we want to write an alternate stream. The idea would be to  
>> use the
>> files inode as the dir name 0x123456 and inside it the stream name as
>> file name for the stream. This way renaming or moving the file  
>> wouldn't
>> loose the streams. Does it make sense?

Ted T'so presented a very similar streams implementation at  
linux.conf.au in 2006:

> That's a pretty good idea - we'd have to do some recursing up the
> tree to find the filesystem root of each share - maybe we could
> do this at share connection time....

A variation on this would be to store the streams metadata in a Samba- 
private EA. This would give you something analogous to the streaminfo  
data link back to the hidden streams data files. You would be able to  
quickly determine the stream status for a file and you'd have a lot of  
flexibility in evolving the implementation. You'd also be able to  
reconstruct the EA metadata from the hidden streams data (slowly), and  
verify the hidden streams data from the EA (quickly). If you  
standardised the EA format, you would be able to add non-Samba tools  
to manipulate streams.

James Peach | jpeach at samba.org

More information about the samba-technical mailing list