diff src/os/unix/ngx_files.h @ 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 b246022ef454
line wrap: on
line diff
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -222,23 +222,26 @@ ngx_err_t ngx_unlock_fd(ngx_fd_t fd);
 
 #if (NGX_HAVE_O_DIRECT)
 
-ngx_int_t ngx_directio(ngx_fd_t fd);
-#define ngx_directio_n           "fcntl(O_DIRECT)"
+ngx_int_t ngx_directio_on(ngx_fd_t fd);
+#define ngx_directio_on_n        "fcntl(O_DIRECT)"
+
+ngx_int_t ngx_directio_off(ngx_fd_t fd);
+#define ngx_directio_off_n       "fcntl(!O_DIRECT)"
 
 #elif (NGX_HAVE_F_NOCACHE)
 
-#define ngx_directio(fd)         fcntl(fd, F_NOCACHE, 1)
-#define ngx_directio_n           "fcntl(F_NOCACHE)"
+#define ngx_directio_on(fd)      fcntl(fd, F_NOCACHE, 1)
+#define ngx_directio_on_n        "fcntl(F_NOCACHE, 1)"
 
 #elif (NGX_HAVE_DIRECTIO)
 
-#define ngx_directio(fd)         directio(fd, DIRECTIO_ON)
-#define ngx_directio_n           "directio(DIRECTIO_ON)"
+#define ngx_directio_on(fd)      directio(fd, DIRECTIO_ON)
+#define ngx_directio_on_n        "directio(DIRECTIO_ON)"
 
 #else
 
-#define ngx_directio(fd)         0
-#define ngx_directio_n           "ngx_directio_n"
+#define ngx_directio_on(fd)      0
+#define ngx_directio_on_n        "ngx_directio_on_n"
 
 #endif