17 static void ngx_file_aio_event_handler(
ngx_event_t *ev);
21 io_submit(aio_context_t ctx,
long n,
struct iocb **paiocb)
23 return syscall(SYS_io_submit, ctx, n, paiocb);
32 struct iocb *piocb[1];
50 aio->event.data = aio;
52 aio->event.log = file->
log;
60 "second aio post for \"%V\"", &file->
name);
65 "aio complete:%d @%O:%z %V",
80 "aio read \"%s\" failed", file->
name.
data);
87 aio->aiocb.aio_data = (uint64_t) (uintptr_t) ev;
88 aio->aiocb.aio_lio_opcode = IOCB_CMD_PREAD;
89 aio->aiocb.aio_fildes = file->
fd;
90 aio->aiocb.aio_buf = (uint64_t) (uintptr_t) buf;
91 aio->aiocb.aio_nbytes = size;
92 aio->aiocb.aio_offset = offset;
93 aio->aiocb.aio_flags = IOCB_FLAG_RESFD;
96 ev->
handler = ngx_file_aio_event_handler;
98 piocb[0] = &aio->aiocb;
115 "io_submit(\"%V\") failed", &file->
name);
134 "aio event handler fd:%d %V", aio->fd, &aio->
file->
name);