samba-technical@lists.samba.org
[Top] [All Lists]

Re: [Samba] Support for multiple file streams?

Subject: Re: [Samba] Support for multiple file streams?
From: James Peach
Date: Mon, 2 Jul 2007 10:27:42 -0700
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:
        http://www.linux.org.au/conf/2006/abstract1f24.html?id=384

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@xxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>