aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-09-30 13:21:52 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-09-30 13:21:52 +0000
commit3266171fd4691d173f698f1c0c246322a94588e2 (patch)
treec6ff4969a31639d546af48a644c5c11b5716b82d /src/http/ngx_http_core_module.c
parent687b0e99ea4ff631e447fff2d177d0c9297529fc (diff)
downloadnginx-3266171fd4691d173f698f1c0c246322a94588e2.tar.gz
nginx-3266171fd4691d173f698f1c0c246322a94588e2.zip
read_ahead
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 19d088160..9c00206d4 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -408,6 +408,13 @@ static ngx_command_t ngx_http_core_commands[] = {
#endif
+ { ngx_string("read_ahead"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_size_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_core_loc_conf_t, read_ahead),
+ NULL },
+
{ ngx_string("directio"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_http_core_directio,
@@ -2957,6 +2964,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
#if (NGX_HAVE_FILE_AIO)
lcf->aio = NGX_CONF_UNSET;
#endif
+ lcf->read_ahead = NGX_CONF_UNSET_SIZE;
lcf->directio = NGX_CONF_UNSET;
lcf->directio_alignment = NGX_CONF_UNSET;
lcf->tcp_nopush = NGX_CONF_UNSET;
@@ -3158,6 +3166,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#if (NGX_HAVE_FILE_AIO)
ngx_conf_merge_value(conf->aio, prev->aio, 0);
#endif
+ ngx_conf_merge_size_value(conf->read_ahead, prev->read_ahead, 0);
ngx_conf_merge_off_value(conf->directio, prev->directio,
NGX_MAX_OFF_T_VALUE);
ngx_conf_merge_off_value(conf->directio_alignment, prev->directio_alignment,