diff options
Diffstat (limited to 'src/os/unix/ngx_linux_aio_read.c')
-rw-r--r-- | src/os/unix/ngx_linux_aio_read.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/os/unix/ngx_linux_aio_read.c b/src/os/unix/ngx_linux_aio_read.c index 3b4185c8b..834a11d07 100644 --- a/src/os/unix/ngx_linux_aio_read.c +++ b/src/os/unix/ngx_linux_aio_read.c @@ -27,13 +27,12 @@ ssize_t ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset, ngx_pool_t *pool) { - long n; - struct iocb *piocb[1]; - ngx_event_t *ev; - ngx_event_aio_t *aio; - static ngx_uint_t enosys = 0; + long n; + struct iocb *piocb[1]; + ngx_event_t *ev; + ngx_event_aio_t *aio; - if (enosys) { + if (!ngx_file_aio) { return ngx_read_file(file, buf, size, offset); } @@ -109,7 +108,7 @@ ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset, "io_submit(\"%V\") failed", &file->name); if (n == NGX_ENOSYS) { - enosys = 1; + ngx_file_aio = 0; return ngx_read_file(file, buf, size, offset); } |