From: Jeff Moyer <jmoyer@redhat.com>
To: Zubin Dittia <zubin@tintri.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: libaio asynchronous syscall io_getevents blocks on error
Date: Tue, 20 Oct 2009 18:25:09 -0400 [thread overview]
Message-ID: <x49ljj5og8q.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <47c554d90910201458of5dc16eg33940584026bc959@mail.gmail.com> (Zubin Dittia's message of "Tue, 20 Oct 2009 14:58:17 -0700")
Zubin Dittia <zubin@tintri.com> writes:
> I'm writing a program that uses the kernel's io_submit/io_getevents
> system calls. What I would like to be able to do is submit N
> operations for i/o on different files, and then call io_getevents with
> min_nr = nr = N and a timeout of NULL, so that I can block until all N
> operations have completed. This works great, except when one of the
> operations has an error (eg., if one of the descriptors is invalid).
> In this case, the call to io_getevents appears to block indefinitely.
> Shouldn't an error on one of the submitted operations count as a
> completion event for that operation, so I can check the error code
> when the call returns? Any help would be appreciated.
Did you check the return value of io_submit?
Cheers,
Jeff
next prev parent reply other threads:[~2009-10-20 22:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 21:58 Zubin Dittia
2009-10-20 22:25 ` Jeff Moyer [this message]
2009-10-20 23:34 ` Zubin Dittia
2009-10-20 23:59 ` Jeff Moyer
2009-10-21 0:10 ` Zubin Dittia
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=x49ljj5og8q.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zubin@tintri.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
all inboxes | Powered by JetHome®