Re: aio: compat_ioctl issue?

From: Michael Tokarev
Date: Mon Mar 08 2010 - 17:32:29 EST


Jeff Moyer wrote:
[]
>>>> I just come across a situation (next in a long row :)
>>>> when on x86, 32bit userspace does not work with 64bit
>>>> kernel. This time this is about aio requests.
> [snip]

> Well, I'm not experiencing such problems. I can run a 32bit aio
> application on a 64bit kernel just fine with 2.6.31, 2.6.32 and
> 2.6.34-rc1.

Interesting. I mentioned that I _think_ I used Oracle 32bit with
AIO on 64bit kernel, but I'm not sure.

> Could you maybe print out the values that are passed to io_getevents?

They were in my first email, here it goes again:

io_submit: lio_opcode=7 reqprio=0 iov=0x9cd7018{0xf5599000,4096}, niov=1, offset=0
io_getevents: expected 4096 got -22 (EINVAL)

This is what gets passed to libaio -- strace here
does not decode the arguments unfortunately.

The file in question is raw partition open with O_DIRECT,
if that makes any difference.

64bit binary uses very similar arguments except that
addresses are different.

My *guess* is that it handles read/write correctly but
does not properly handle preadv/pwritev (opcode=7 is
IO_CMD_PREADV as far as I can see). That'll explain
my "testcase" with Oracle which does not use preadv.

Thanks!

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/