Re: [PATCH] cowlinks v2

Jörn Engel
2004-03-21T20:36:24Z

On Sun, 21 March 2004 12:26:57 -0800, Davide Libenzi wrote:
>
> Yes, at that time I preferred to fall back to the caller open(2) if any
> error happened during the COW (a more picky implementation would simply
> bounce an error to the application). Look BTW that there is a difference
> between the error handling when you have an in-kernel solution or a
> completely userspace solution. If you push this inside the kernel you have
> at least to define a new open(2) flag and a new set of errors that might
> arise when doing the COW. You are basically changing the open(2) API. You
> have also to "teach" apps to use the new flag, since obviously you cannot
> make COW a default behavior. The fl-cow approach let you define a set of
> paths where you want COW to happen (in my case typically /usr/src/lk), and
> only apps writing to hard-linked files inside such path gets COWed. The
> open(2) API does not change. OTOH there is the LD_PRELOAD trick that is
> weak alias dependent.

My "solution" to this paradox (leaving the interface unchanged, even
though cow is impossible without changes) is a new flag to files. The
user has to manually set the flag and is now in charge of anything
that might break. Scared? Don't set the flag.

It is a compromise, just like yours. Imo it is a little nicer, but
there just isn't any good solution anymore, 1967 would have been the
right time for that.

Jörn

--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918