Re: [PATCH] cowlinks v2

From: Davide Libenzi
Date: Sun Mar 21 2004 - 13:02:38 EST


On Sun, 21 Mar 2004, Jörn Engel wrote:

> On Sat, 20 March 2004 08:48:43 -0800, Davide Libenzi wrote:
> >
> > FWIW I did this quite some time ago to speed up copy+diff linux kernel
> > trees:
> >
> > http://www.xmailserver.org/flcow.html
> >
> > It is entirely userspace and uses LD_PRELOAD on my dev shell.
>
> Nice work. I was thinking about something like that as an
> intermediate solution (my goal is libc inclusion), just with slightly
> different checks:
>
> int ret = open(...);
> if (ret == -EMLINK)
> ret = cow_open(...);
> return ret;

When I did that, fumes of an in-kernel implementation invaded my head for
a little while. Then you start thinking that you have to teach apps of new
open(2) semantics, you have to bloat kernel code a little bit and you have
to deal with a new set of errors cases that open(2) is not expected to
deal with. A fully userspace implementation did fit my needs at that time,
even if the LD_PRELOAD trick might break if weak aliases setup for open
functions change inside glibc.



- Davide


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