From: Johann Felix Soden <johfel@gmx.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Johann Felix Soden <johfel@gmx.de>,
Patrick McManus <mcmanus@ducksong.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] splice: fix problem with sys_tee and SPLICE_F_NONBLOCK
Date: Tue, 19 Feb 2008 22:47:41 +0100 [thread overview]
Message-ID: <1203457661.7758.31.camel@localhost> (raw)
In-Reply-To: <20080219212530.GN23197@kernel.dk>
Am Dienstag, den 19.02.2008, 22:25 +0100 schrieb Jens Axboe:
> On Tue, Feb 19 2008, Johann Felix Soden wrote:
> > > On Tue, Feb 19 2008, Johann Felix Soden wrote:
> > > > From: Johann Felix Soden <johfel@users.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.
>
I thought again about the problem and my patch: you are right, the patch
is nonsense. I have learnt, that the correctness of a patch is not
guaranteed by the (bad, but anyhow working) solution of the problem the
patch was written for.
Sorry for wasting your time.
--
J. F. Soden
next prev parent reply other threads:[~2008-02-19 21:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 20:14 [PATCH] splice: fix problem with sys_tee and SPLICE_F_NONBLOCK Johann Felix Soden
2008-02-19 20:25 ` Jens Axboe
2008-02-19 21:12 ` Johann Felix Soden
2008-02-19 21:25 ` Jens Axboe
2008-02-19 21:47 ` Johann Felix Soden [this message]
2008-02-20 9:35 ` Jens Axboe
2008-02-20 10:07 ` Johann Felix v. Soden-Fr.
2008-02-20 10:39 ` Jens Axboe
2008-02-20 16:31 ` Patrick McManus
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=1203457661.7758.31.camel@localhost \
--to=johfel@gmx.de \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcmanus@ducksong.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.