All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	linux-aio@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6-bk] aio not returning error code(?)
Date: Wed, 7 Jul 2004 18:33:03 -0400	[thread overview]
Message-ID: <20040707223302.GA6513@kvack.org> (raw)
In-Reply-To: <Pine.LNX.4.60.0407071430170.28653@hermes-1.csi.cam.ac.uk>

On Wed, Jul 07, 2004 at 02:42:44PM +0100, Anton Altaparmakov wrote:
> --- bklinux-2.6/fs/aio.c	2004-07-01 11:19:35.000000000 +0100
> +++ bklinux-2.6/fs/aio.c.new	2004-07-07 14:26:19.445631304 +0100
> @@ -1086,7 +1086,7 @@ int fastcall io_submit_one(struct kioctx
>  	if (likely(-EIOCBQUEUED == ret))
>  		return 0;
>  	aio_complete(req, ret, 0);	/* will drop i/o ref to req */
> -	return 0;
> +	return ret;

That's wrong: you now get 2 results for the same operation -- an error on 
the submit, and an event with a return code.  In order for the user code 
to do the right thing, you must only get one or the other.  If io_submit 
fails for a particular iocb, there must be no event returned.

		-ben
-- 
"Time is what keeps everything from happening all at once." -- John Wheeler

       reply	other threads:[~2004-07-07 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.60.0407071430170.28653@hermes-1.csi.cam.ac.uk>
2004-07-07 22:33 ` Benjamin LaHaise [this message]
     [not found]   ` <1089291383.5891.69.camel@imp.csi.cam.ac.uk>
2004-07-08 13:27     ` [PATCH 2.6-bk] aio not returning error code(?) Benjamin LaHaise
2004-07-08 13:30     ` Suparna Bhattacharya

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=20040707223302.GA6513@kvack.org \
    --to=bcrl@kvack.org \
    --cc=aia21@cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=linux-aio@kvack.org \
    --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 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.