From 66ef8eba590ab96429356650297e173f41396eff Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 30 Sep 2011 13:57:44 +0000 Subject: Merging r4077, r4101, r4102: open_file_cache related fixes: *) 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. *) Bugfix: open_file_cache did not update file info on retest. If file inode was not changed, cached file information was not updated on retest. As a result stale information might be cached forever if file attributes was changed and/or file was extended. --- src/os/unix/ngx_linux_aio_read.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/os/unix/ngx_linux_aio_read.c') diff --git a/src/os/unix/ngx_linux_aio_read.c b/src/os/unix/ngx_linux_aio_read.c index 72875ca01..b9d1d01cd 100644 --- a/src/os/unix/ngx_linux_aio_read.c +++ b/src/os/unix/ngx_linux_aio_read.c @@ -74,6 +74,10 @@ ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset, } 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; } -- cgit