Hi guys... Trying to do some AIO stuff here, and got a question.
Perhaps I'm not understanding how AIO works in UML... Could someone
perhaps give me an explanation of why we end up in pread, instead of
aio? Does UML not support AIO through its block device driver?
Thank you,
Allan
The simple test program:
#include <aio.h>
#include <errno.h>
#include <fcntl.h>
main()
{
struct aiocb aiocb;
int fd;
char buf[1024];
fd = open("/tmp/outfile", O_RDONLY);
perror("open");
bzero(&aiocb, sizeof(aiocb));
aiocb.aio_fildes = fd;
aiocb.aio_buf = buf;
aiocb.aio_nbytes = sizeof(buf);
aio_read(&aiocb);
perror("aio_read");
while (aio_error(&aiocb) == EINPROGRESS);
printf("buf = %s\n", buf);
}
Tracing the aio_read() through the UML kernel finally gets me here:
#0 sys_pread64 (fd=3, buf=0xbf7c8f20 "", count=1024, pos=0)
at fs/read_write.c:354
#1 0x08062ff8 in execute_syscall_skas (r=0x12374864)
at arch/um/kernel/skas/syscall_kern.c:29
#2 0x0806302f in handle_syscall (regs=0x12374864)
at arch/um/kernel/skas/syscall_user.c:25
#3 0x08062651 in userspace (regs=0x12374864)
at arch/um/kernel/skas/process.c:91
#4 0x08062d44 in fork_handler (sig=10) at thread_info.h:47
#5 <signal handler called>
#6 0xffffe410 in __kernel_vsyscall ()
#7 0x00000000 in ?? ()
(gdb)
begin:vcard
fn:Allan Graves
n:Graves;Allan
email;internet:[EMAIL PROTECTED]
tel;work:603-8973276
x-mozilla-html:FALSE
version:2.1
end:vcard