Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752929AbZJUAKw (ORCPT ); Tue, 20 Oct 2009 20:10:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751142AbZJUAKw (ORCPT ); Tue, 20 Oct 2009 20:10:52 -0400 Received: from mail-iw0-f178.google.com ([209.85.223.178]:56744 "EHLO mail-iw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbZJUAKv convert rfc822-to-8bit (ORCPT ); Tue, 20 Oct 2009 20:10:51 -0400 MIME-Version: 1.0 In-Reply-To: References: <47c554d90910201458of5dc16eg33940584026bc959@mail.gmail.com> <47c554d90910201634n68b359c1n501ed5669deb07be@mail.gmail.com> Date: Tue, 20 Oct 2009 17:10:55 -0700 Message-ID: <47c554d90910201710s1be91d45u1b71600fe0cfeb04@mail.gmail.com> Subject: Re: libaio asynchronous syscall io_getevents blocks on error From: Zubin Dittia To: Jeff Moyer Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 30 Thanks, Jeff, this makes sense. In order to get error codes for all I/Os that are being submitted, I'll have to loop calling io_submit on successively smaller portions of the initial array of requests, each time trimming off the ones that have been successfully submitted. -Zubin On Tue, Oct 20, 2009 at 4:59 PM, Jeff Moyer wrote: > Zubin Dittia writes: > >> But this does bring up the interesting question of how to know which >> of the I/Os I submitted had an error, and what the error was. ?Does it > > If io_submit returned N, then the N+1 iocb had an error. > >> PS: It does seem a little strange that io_submit returns an error if >> the first IOCB is invalid but not when any of the other IOCBs are >> invalid (this appears to be the case, at least according to the man >> page). > > It makes sense that it tells you how many it could successfully submit. > If it can't submit any, you get the error from the first I/O. > > Cheers, > Jeff > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/