[Samba] Support for multiple file streams?
simo
idra at samba.org
Mon Jul 2 17:39:08 GMT 2007
On Mon, 2007-07-02 at 10:27 -0700, James Peach wrote:
> 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.
Using the EA to store a file path to the /.streams dir would be very
good, that would avoid the unix side delete/create problem as we have a
way to validate it is the right stream.
Sounds a nice mix :-)
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org
More information about the samba-technical
mailing list