aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_open_file_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_open_file_cache.c')
-rw-r--r--src/core/ngx_open_file_cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 704d0ab79..f2e8afc51 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -497,6 +497,13 @@ ngx_open_and_stat_file(u_char *name, ngx_open_file_info_t *of, ngx_log_t *log)
} else {
of->fd = fd;
+
+ if (of->directio <= ngx_file_size(&fi)) {
+ if (ngx_directio(fd) == -1) {
+ ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
+ ngx_directio_n " \"%s\" failed", name);
+ }
+ }
}
done: