public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Antill <james@and.org>
To: "David S. Miller" <davem@redhat.com>
Cc: matti.aarnio@zmailer.org, zilvinas@gemtek.lt,
	linux-kernel@vger.kernel.org
Subject: Re: sendfile(2) behaviour has changed ?
Date: 17 Oct 2002 16:51:30 -0400	[thread overview]
Message-ID: <m3it00zt4d.fsf@code.and.org> (raw)
In-Reply-To: <20021016.025935.132073102.davem@redhat.com>

"David S. Miller" <davem@redhat.com> writes:

>    From: Matti Aarnio <matti.aarnio@zmailer.org>
>    Date: Wed, 16 Oct 2002 12:10:46 +0300
> 
>    On Wed, Oct 16, 2002 at 10:49:08AM +0200, Zilvinas Valinskas wrote:
>    > Is this expected behaviour ? that sendfile(2) on 2.5.4x linux kernel requires
>    > socket as an output fd paramter ? 
>    
>      It has only been intended for output to a TCP stream socket.
> 
> To be honest, I'm not so sure about this.
> 
> For example, I definitely see us supporting this in the
> opposite direction when commodity 10gbit hits the market.
> 
> Initially I thought "sys_receivefile()" but it makes no
> sense when we have a system call that is perfectly capable
> of describing the tcp_socket --> page_cache operation.

 It really needs a new interface for recvfile/copyfile/whatever
anyway, as you can only specify an off_t for the from fd at present.

 Also consider that if you have 2 network sockets you really want a
way to see which did the EAGAIN.

 Which leads to something like...

ssize_t copyfddata(int out_fd, off_t *offset, 
                   int in_fd,  off_t *offset, size_t count, int *in_errno);

...and another for the off64_t API, the errno thing looks crappy but I
think creating EREADAGAIN is even worse (and I just know that won't be
the last if it's done that way) ... unless you can think of another way.

-- 
# James Antill -- james@and.org
:0:
* ^From: .*james@and\.org
/dev/null

  parent reply	other threads:[~2002-10-17 20:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16  8:49 sendfile(2) behaviour has changed ? Zilvinas Valinskas
2002-10-16  9:10 ` Matti Aarnio
2002-10-16  9:59   ` David S. Miller
2002-10-16 10:25     ` bert hubert
2002-10-17 20:51     ` James Antill [this message]
2002-10-17 22:41       ` David S. Miller
2002-10-17 23:23         ` James Antill
  -- strict thread matches above, loose matches on Subject: below --
2002-10-20  9:50 sendfile(2) behaviour has changed? Dan Maas
2002-10-24 22:37 ` Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3it00zt4d.fsf@code.and.org \
    --to=james@and.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.aarnio@zmailer.org \
    --cc=zilvinas@gemtek.lt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox