Re: [PATCH] cowlinks v2

Ross Biro
2004-04-02T19:35:44Z

On Fri, 2 Apr 2004 20:23:58 +0200, Pavel Machek <pavel@ucw.cz> wrote:
> > > > If you really want cowlinks and hardlinks to be intermixed freely, I'd
> > > > happily agree with you as soon as you can define the behaviour for all
> > > > possible cases in a simple document and none of them make me scared
> > > > again. Show me that it is possible and makes sense.

Maybe it's easiest to view the proposed copyfile() as being
semantically equivalent to cp from the point of view of anything above
the actual file system (modulo running out of space at weird times)

Then all the questions are easy to answer, and it would also be
possible to implement copyfile at the VFS layer as cp for file systems
that don't support it.

Of course, it gets more interesting if you try to do it at the block
level instead of at the file level. For ext2, you could just reserve
a block #, say -1, to mean take the data from the master cow file, and
anything else is treated normally. You would need a deamon to make
sure you were still saving space though.