Re: named streams, extended attributes, and posix

Peter Samuelson
2001-01-17T02:05:39Z

[Peter Samuelson]
> > What if you copy both 'filename' and 'filename:ext' onto the same
> > fs? Do they get combined into one file?

[Michael Rothwell]
> ON Ext2, you get two files. On NTFS, you get one file, and a stream
> on that file.

Yeah. I think that's broken. It gets worse when you start doing other
posixy things. Say you do 'mv foo bar:baz' on an ntfs partition.
Those strong in the force will recall that rename() is supposed to
atomically unlink 'bar:baz'. Instead you seem to be asking it to add
an extra stream to 'bar'. So should we still unlink the old 'bar'?
And then what if 'foo' is a multi-stream file? Where do the extra
streams go? Or do you just get a big fat -EINVAL for every special
case?

I think ultimately there is no posixy (or least-surprise) way to deal
with such things. If we truly need forks, we need a new api to
manipulate them. Cleverness with ':' or '/' only takes you so far.

Peter