mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Jan Blunck <j.blunck@tu-harburg.de>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] generic_file_sendpage
Date: Fri, 15 Jul 2005 13:22:55 +0200	[thread overview]
Message-ID: <20050715112255.GC2721@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20050715040611.05907f4a.akpm@osdl.org>

On Fri, 15 July 2005 04:06:11 -0700, Andrew Morton wrote:
> > +
> > +	/* There is no sane reason to use O_DIRECT */
> > +	BUG_ON(file->f_flags & O_DIRECT);
> 
> err, this seems like an easy way for people to make the kernel go BUG.

Is there a sane use for O_DIRECT in combination with sendfile()?

If not, I'd like to change sys_sendfile() and return -EINVAL for
O_DIRECT file descriptors.

> > +	if (unlikely(signal_pending(current)))
> > +		return -EINTR;
> 
> This doesn't help.  The reason we've avoided file-to-file sendfile() is
> that it can cause applications to get uninterruptibly stuck in the kernel
> for ages.  This code doesn't solve that problem.  It needs to handle
> signal_pending() inside the main loop.
> 
> And it probably needs to return a sane value (number of bytes copied)
> rather than -EINTR.

Makes sense.

> I don't know if we want to add this feature, really.  It's such a
> specialised thing.

With union mount and cowlink, there are two users already.  cp(1)
could use it as well, even if the improvement is quite minimal.

Jörn

-- 
All art is but imitation of nature.
-- Lucius Annaeus Seneca

  reply	other threads:[~2005-07-15 11:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-15 10:48 Jan Blunck
2005-07-15 11:06 ` Andrew Morton
2005-07-15 11:22   ` Jörn Engel [this message]
2005-07-15 13:13     ` Jan Engelhardt
2005-07-15 16:08       ` Linus Torvalds
2005-07-15 19:02         ` Jan Engelhardt
2005-07-15 19:16           ` Linus Torvalds
2005-07-21  5:34     ` Herbert Poetzl
2005-07-15 12:34   ` [PATCH] generic_file_sendpage (updated patch) Jan Blunck
2005-07-15 16:01   ` [PATCH] generic_file_sendpage Linus Torvalds
2005-07-20 19:03     ` Jan Blunck

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=20050715112255.GC2721@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=akpm@osdl.org \
    --cc=j.blunck@tu-harburg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®