Mercurial > hg > nginx
changeset 4076:37da005a5808
Bugfix: open_file_cache lost is_directio flag.
On file retest open_file_cache lost is_directio if file wasn't changed.
This caused unaligned operations under Linux to fail with EINVAL.
It wasn't noticeable with AIO though, as errors wasn't properly logged.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 05 Sep 2011 16:36:19 +0000 |
parents | 39574a944f66 |
children | 24f511e94057 |
files | src/core/ngx_open_file_cache.c src/os/unix/ngx_file_aio_read.c src/os/unix/ngx_linux_aio_read.c |
diffstat | 3 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_open_file_cache.c Mon Sep 05 16:26:51 2011 +0000 +++ b/src/core/ngx_open_file_cache.c Mon Sep 05 16:36:19 2011 +0000 @@ -290,6 +290,8 @@ file->use_event = 1; } + of->is_directio = file->is_directio; + goto renew; }
--- a/src/os/unix/ngx_file_aio_read.c Mon Sep 05 16:26:51 2011 +0000 +++ b/src/os/unix/ngx_file_aio_read.c Mon Sep 05 16:36:19 2011 +0000 @@ -86,6 +86,9 @@ return aio->nbytes; } + ngx_log_error(NGX_LOG_CRIT, file->log, ngx_errno, + "aio read \"%s\" failed", file->name.data); + return NGX_ERROR; }
--- a/src/os/unix/ngx_linux_aio_read.c Mon Sep 05 16:26:51 2011 +0000 +++ b/src/os/unix/ngx_linux_aio_read.c Mon Sep 05 16:36:19 2011 +0000 @@ -74,6 +74,10 @@ } ngx_set_errno(-aio->res); + + ngx_log_error(NGX_LOG_CRIT, file->log, ngx_errno, + "aio read \"%s\" failed", file->name.data); + return NGX_ERROR; }