Re: [PATCH] cowlinks v2

Jamie Lokier
2004-03-27T10:28:42Z

Eric W. Biederman wrote:
> It is easy to add something like a cowstat or a readcowlink and teach
> the few programs that care (i.e. diff, tar,...) how to use it. So I
> would rather concentrate on making cow links look like a separate copy
> than early optimizations.

I agree, having each cowlink look like a separate copy, with separate
inode numbers, is best. That _is_ POSIX compatible -- the sharing is
just a storage optimisation, and programs which only use the POSIX API
won't see the difference.

I have no problem with adding cowstat() to diff, and I'm sure other
people will eventually extend rsync and tar to use it, if it becomes
widely used.

It's not the simplest solution, though. The filesystem changes are
non-trivial. (The simplest solution is just an ext2 attribute which
says you can't write to the file if it has >1 links).

-- Jamie