Re: [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks

From: Jamie Lokier
Date: Tue May 11 2004 - 19:41:28 EST


Jörn Engel wrote:
> What about ino? I currently return 1, so diff remains fast without
> any changes. If someone really needs the difference between inode 2
> and 3, I would introduce a cstat() system call similar to lstat(),
> which would return ino=2.
>
> Is this sane? Should it be reversed and cstat() return ino=1, while
> stat returns ino=2? I can imagine that "tar -x" would create hard
> links for every cowlink that "tar -c" saw, but I'm not sure yet.

I think it should be reversed.

One very useful application for cowlinks is for virtual machine (UML)
and chroot jail setups, where an entire filesystem tree is copied
perhaps hundreds of times on a single disk. I'm surprised we didn't
think of this earlier, as it's potentially one of the most useful
applications for cowlinks.

In that scenario, cowlinks would save enormous amounts of storage and
potentially save memory too. However to be useful at all, they'd need
to have accurate POSIX semantics: that is, cowlinks must behave very
much as a storage optimisation only.

That means stat() should return ino==2.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/