# HG changeset patch # User Igor Sysoev # Date 1221226791 0 # Node ID 987831d73bd83b08fbcb3f7df7e2ad54fe1a6fcc # Parent 8a98616abb73671fc3cbec4de0f183c8b5e48325 cache directio flag in open file cache diff -r 8a98616abb73 -r 987831d73bd8 src/core/ngx_open_file_cache.c --- a/src/core/ngx_open_file_cache.c Thu Sep 11 15:52:11 2008 +0000 +++ b/src/core/ngx_open_file_cache.c Fri Sep 12 13:39:51 2008 +0000 @@ -205,6 +205,7 @@ of->is_file = file->is_file; of->is_link = file->is_link; of->is_exec = file->is_exec; + of->is_directio = file->is_directio; if (!file->is_dir) { file->count++; @@ -360,6 +361,7 @@ file->is_file = of->is_file; file->is_link = of->is_link; file->is_exec = of->is_exec; + file->is_directio = of->is_directio; if (!of->is_dir) { file->count++; @@ -499,9 +501,9 @@ of->fd = fd; if (of->directio <= ngx_file_size(&fi)) { - if (ngx_directio(fd) == -1) { + if (ngx_directio_on(fd) == -1) { ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, - ngx_directio_n " \"%s\" failed", name); + ngx_directio_on_n " \"%s\" failed", name); } else { of->is_directio = 1; diff -r 8a98616abb73 -r 987831d73bd8 src/core/ngx_open_file_cache.h --- a/src/core/ngx_open_file_cache.h Thu Sep 11 15:52:11 2008 +0000 +++ b/src/core/ngx_open_file_cache.h Fri Sep 12 13:39:51 2008 +0000 @@ -63,6 +63,7 @@ unsigned is_file:1; unsigned is_link:1; unsigned is_exec:1; + unsigned is_directio:1; ngx_event_t *event; };