public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@redhat.com>
To: John Gardiner Myers <jgmyers@netscape.com>
Cc: linux-aio@kvack.org, linux-kernel@vger.kernel.org,
	torvalds@transmeta.com
Subject: Re: [PATCH] aio updates
Date: Tue, 15 Oct 2002 17:31:53 -0400	[thread overview]
Message-ID: <20021015173153.G16156@redhat.com> (raw)
In-Reply-To: <3DAC7FA0.3060600@netscape.com>; from jgmyers@netscape.com on Tue, Oct 15, 2002 at 01:50:40PM -0700

On Tue, Oct 15, 2002 at 01:50:40PM -0700, John Gardiner Myers wrote:
> Benjamin LaHaise wrote:
> 
> >My 
> >concern is that the way you've implemented NOOP does not allow for all 
> >possible return codes to be passed in due to the error checking the 
> >iocb submit code performs on the inputs.
> >
> Could you provide an example of a possible return code that cannot be 
> passed in?  I know you can't pass a 64 bit return code on a 32 bit 
> platform, but then neither can any other operation.

aio_nbytes is clamped to disallow negative values at present.

> Currently the operation requires a valid fd just like every other 
> operation does, so I don't consider such a failure to be spurious.

Okay, if it is documented, that makes sense.  I just wasn't sure if it 
happened to be an oversight.

> The alternative is to change the aio framework itself to support 
> operations that don't work on fds.  That would move the fget() call and 
> the overflow check to below where it sets req->ki_user_data.  The check 
> for IOCB_CMD_NOOP would then go before the fget() call and overflow check.
> 
> If you think this is the way to go, I can code up patch to do this.

That's a possibility.  I don't like the idea of splitting things out too 
much, as special cases look ugly.  The io_submit interface really does 
assume that the file descriptor exists, and removing that doesn't really 
make sense -- non-file descriptor consuming operations should most likely 
be their own syscalls (imho).  But if you're okay with requiring an fd 
for the NOOP, then that seems alright.  Does anyone else have any thoughts 
on the matter?

		-ben
-- 
"Do you seek knowledge in time travel?"

  reply	other threads:[~2002-10-15 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15  1:17 [PATCH] aio updates John Myers
2002-10-15 19:57 ` Benjamin LaHaise
2002-10-15 20:50   ` John Gardiner Myers
2002-10-15 21:31     ` Benjamin LaHaise [this message]
2002-10-15 22:05       ` John Gardiner Myers
2002-10-15 22:08       ` John Gardiner Myers

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=20021015173153.G16156@redhat.com \
    --to=bcrl@redhat.com \
    --cc=jgmyers@netscape.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox