Re: INTERFACE FIX: sendfile()

H. Peter Anvin (hpa@transmeta.com)
26 Oct 1998 19:40:06 GMT


Followup to: <priv$a6f114836$9e64c@lk9qw.mail.eon.ml.org>
By author: Janos Farkas <Janos.Farkas-nouce/priv-#m92b0lQaWUZMZoWA8wbM1z6FIke@lk9qw.mail.eon.ml.org>
In newsgroup: linux.dev.kernel
>
> On 1998-10-24 at 23:27:32, Pavel Machek wrote:
> > As a solution, I propose sendfile() works on anything and it just
> > falls back internaly to read()/write(). This will allow us to keep
> > same interface forever.
>
> Hmm.. I thought sendfile(), as a non-traditional, but very sexy thing.
> Yes, it's very cool, but noone should depend on it being available. And
> in fact, can't; if you care about other platforms just a little bit, you
> have to have a workaround anyway. It's not even in every Linux
> installation, since not everyone is/will be able to update to 2.2. The
> only problem I see with returning EINVAL in "random" cases is that it's
> not a one-liner to keep track when to not use sendfile() again if you
> would be hit by using it too much, but I never saw it as a real problem.
>

Yes; if the interface supports a clean fallback in user space that is
probably the best.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

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