Re: [PATCH for testing] cow behaviour for hard links

From: Pavel Machek
Date: Sat Mar 13 2004 - 14:27:52 EST


Hi!

> > - removed inheritance, as it's not useful in any way, not expected and breaks
> > linking of files with S_COWLINK set.
>
> Not useful? Without inheritance, I have to manually add the flag for
> every file/directory I add. Each time I forget, writes go to both
> files and I notice the mess weeks later. Naa, that's where we're now
> and why I created the patch in the first place.
>
> What we do need, though, is a new errno. -EMLINK is close, but still
> wrong.

I do not know your current design, but...

In ideal world there would be no COW links. System would
magically detect that you are doing cp -a, and would link
at individual block level.

Well, that would be probably too fs-specific. But introducing copyfile()
syscall, which would just link the inodes if underlying fs
supported it might be good start. On first
write into one
of linked files copy
would be done...

Only disadvantage I see is that such links would not survive
tar-backup...
Pavel

--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

-
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/