mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 09:42:39 +08:00
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.
This commit is contained in:
parent
3a73e50498
commit
4f65a05d18
@ -290,6 +290,8 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name,
|
||||
file->use_event = 1;
|
||||
}
|
||||
|
||||
of->is_directio = file->is_directio;
|
||||
|
||||
goto renew;
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,9 @@ ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset,
|
||||
return aio->nbytes;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_CRIT, file->log, ngx_errno,
|
||||
"aio read \"%s\" failed", file->name.data);
|
||||
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user