[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070601054120.GI32105@kernel.dk>
Date: Fri, 1 Jun 2007 07:41:21 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Eric Dumazet <dada1@...mosbay.com>, linux-kernel@...r.kernel.org,
cotte@...ibm.com, hugh@...itas.com, neilb@...e.de,
zanussi@...ibm.com, Linus Torvalds <torvalds@...l.org>,
hch@...radead.org
Subject: Re: [PATCH] sendfile removal
On Thu, May 31 2007, H. Peter Anvin wrote:
> Jens Axboe wrote:
> >>
> >>> - retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
> >>> + fl = 0;
> >>> + if (in_file->f_flags & O_NONBLOCK)
> >>> + fl = SPLICE_F_NONBLOCK;
> >>> +
> >>> + retval = do_splice_direct(in_file, ppos, out_file, count, fl);
> >> I like this, but are you sure it wont break user land ?
> >>
> >> Some applications might react badly if sendfile() returns EAGAIN ?
> >
> > Yeah, I didn't actually intend for that to sneak in. I'd think that
> > userspace should handle it if they opened the file O_NONBLOCK (or used
> > fcntl()), but it's a change in behaviour none the less and probably not
> > a good idea.
> >
>
> I would personally argue that sendfile() blocking on an O_NONBLOCK
> desriptor, as opposed to returning EAGAIN, is a bug, and a fairly
> serious such.
I agree, but it's still a change in behaviour. Even if we consider the
app buggy (it is), can we potentially break it?
--
Jens Axboe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists