The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Gunnar Ritter <Gunnar.Ritter@pluto.uni-freiburg.de>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Steve French <smfltc@us.ibm.com>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/3] copyfile: generic_sendpage
Date: Tue, 07 Sep 2004 14:03:19 +0200	[thread overview]
Message-ID: <413DA387.nailA2K1PT2WH@pluto.uni-freiburg.de> (raw)
In-Reply-To: <20040907114536.GA26630@wohnheim.fh-wedel.de>

Jörn Engel <joern@wohnheim.fh-wedel.de> wrote:

Also it might perhaps make sense to add the kernel programmer's
equivalent of

> +	while (count) {
> +		size_t n = min(count, (size_t)4096);
> +		ret = in_file->f_op->sendfile(in_file, ppos, n, actor,out_file);
> +		if (ret < 0) {
> +			if (done)
> +				return done;
> +			else
> +				return ret;
> +		}
> +
> +		done += ret;
> +		count -= ret;
> +
> +		if ((ret == 0) || signal_pending(current))
                {
			if (count == 0) {
				done = -1;
				errno = EINTR;
			}
> +			break;
		}
> +		cond_resched();
> +	}
> +	return done;
> +}

here, for write-like semantics, too.

	Gunnar

  reply	other threads:[~2004-09-07 12:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 16:57 [PATCH 1/3] copyfile: generic_sendpage Jörn Engel
2004-09-04 16:59 ` [PATCH 2/3] copyfile: sendfile Jörn Engel
2004-09-04 17:04   ` [PATCH 3/3] copyfile: copyfile Jörn Engel
2004-09-04 17:08     ` Jörn Engel
2004-09-04 17:11   ` [PATCH 2/3] copyfile: sendfile Christoph Hellwig
2004-09-04 17:16     ` Jörn Engel
2004-09-04 17:12 ` [PATCH 1/3] copyfile: generic_sendpage Christoph Hellwig
2004-09-04 17:22   ` Jörn Engel
2004-09-04 17:25     ` Christoph Hellwig
2004-09-07  8:32       ` Jan Blunck
2004-09-04 22:39 ` Andrew Morton
2004-09-05  0:16   ` William Lee Irwin III
2004-09-05  0:23     ` Andrew Morton
2004-09-06 11:54   ` Jörn Engel
2004-09-06 12:45   ` Gunnar Ritter
2004-09-06 13:35     ` Jörn Engel
2004-09-06 14:32       ` Gunnar Ritter
2004-09-06 14:46         ` Oliver Neukum
2004-09-06 15:51           ` Gunnar Ritter
2004-09-07 11:09         ` Jörn Engel
2004-09-07 11:45           ` Jörn Engel
2004-09-07 12:03             ` Gunnar Ritter [this message]
2004-09-07 12:08               ` Jörn Engel
2004-09-07 12:32                 ` Gunnar Ritter
2004-09-07 11:48           ` Gunnar Ritter
2004-09-07 12:04             ` Jörn Engel

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=413DA387.nailA2K1PT2WH@pluto.uni-freiburg.de \
    --to=gunnar.ritter@pluto.uni-freiburg.de \
    --cc=akpm@osdl.org \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smfltc@us.ibm.com \
    /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