| * Copyright (C) Igor Sysoev |
| * Copyright (C) Nginx, Inc. |
| ngx_aio_read_chain(ngx_connection_t *c, ngx_chain_t *cl, off_t limit) |
| if (c->read->pending_eof) { |
| /* we can post the single aio operation only */ |
| return total ? total : NGX_AGAIN; |
| /* coalesce the neighbouring bufs */ |
| while (cl && prev == cl->buf->last) { |
| size += cl->buf->end - cl->buf->last; |
| n = ngx_aio_read(c, buf, size); |
| ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "aio_read: %d", n); |
| return total ? total : NGX_AGAIN; |
| c->read->pending_eof = 1; |
| ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
| "aio_read total: %d", total); |
| return total ? total : NGX_AGAIN; |