This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [PATCH] Make lio_listio set errno to EIO on requests with invalid aio_lio_opcode


Jakub Jelinek wrote:
On Tue, Feb 21, 2006 at 12:54:09PM +0530, Suzuki wrote:

Roland McGrath wrote:

There is no obligation to check for this kind of error, given the standard.

According to the standards, lio_listio should return EIO with invalid opcodes.


"According to the standards" is vague, you need to cite precisely what you base
your assertion on.
I don't see such requirement in
http://www.opengroup.org/onlinepubs/009695399/functions/lio_listio.html

Sorry for the vague description. I was referring to the same document. It says :


"The aio_lio_opcode field of each aiocb structure specifies the operation to be performed. The supported operations are LIO_READ, LIO_WRITE, and LIO_NOP; these symbols are defined in <aio.h>. The LIO_NOP operation causes the list entry to be ignored. "
....


"[EIO]
One or more of the individual I/O operations failed. The application may check the error status for each aiocb structure to determine the individual request(s) that failed."


If the opcode is not supported then that I/O operation should fail. For those requests, since we know that I/O operation has failed, even before enqueuing a request, shouldn't lio_listio() return EIO ?


Thanks,


Suzuki

Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]