diff src/core/ngx_open_file_cache.c @ 410:a8e3f1441eec NGINX_0_7_17

nginx 0.7.17 *) Feature: now the "directio" directive works on Linux. *) Feature: the $pid variable. *) Bugfix: the "directio" optimization that had appeared in 0.7.15 did not work with open_file_cache. *) Bugfix: the "access_log" with variables did not work on Linux; the bug had appeared in 0.7.7. *) Bugfix: the ngx_http_charset_module did not understand quoted charset name received from backend.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Sep 2008 00:00:00 +0400
parents 79c5df00501e
children 6281966854a5
line wrap: on
line diff
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -205,6 +205,7 @@ ngx_open_cached_file(ngx_open_file_cache
                 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 @@ update:
         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 @@ ngx_open_and_stat_file(u_char *name, ngx
         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;