[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080219212530.GN23197@kernel.dk>
Date: Tue, 19 Feb 2008 22:25:30 +0100
From: Jens Axboe <jens.axboe@...cle.com>
To: Johann Felix Soden <johfel@....de>
Cc: Patrick McManus <mcmanus@...ksong.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] splice: fix problem with sys_tee and SPLICE_F_NONBLOCK
On Tue, Feb 19 2008, Johann Felix Soden wrote:
> > On Tue, Feb 19 2008, Johann Felix Soden wrote:
> > > From: Johann Felix Soden <johfel@...rs.sourceforge.net>
> > >
> > > With SPLICE_F_NONBLOCK sys_tee should return number of duplicated bytes,
> > > not only -EAGAIN on success.
> >
> > ?
> >
> > The current behaviour is to return bytes tee'd, or return -EAGAIN for
> > zero bytes if SPLICE_F_NONBLOCK is set. It doesn't return "-EAGAIN on
> > success", not sure what you mean there.
> >
> Sorry, my patch description was not correct.
>
> The new behavior of sys_tee with my patch is:
> - return -EAGAIN if there are no data in the pipe, but writer
> connected to the pipe,
> - return 0 if there are not writers connected
> - else return number of duplicated byte
>
> The old behavior was: return -EAGAIN or the number (>0) of duplicated
> bytes.
Your patch has an odd way of achieving that goal, modify the real
location of the assignment instead of overriding something. That has the
potential to turn into another confusing bug later on, wondering why the
heck your return value isn't being passed back.
Improvement is welcome though, you can't distuingish -EAGAIN on the
input side from the output side currently.
--
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