Klaus Demo nginx / 9afd58f
open_file_cache_events Igor Sysoev 14 years ago
9 changed file(s) with 22 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
352352
353353 update:
354354
355 if (ngx_event_flags & NGX_USE_VNODE_EVENT && of->fd != NGX_INVALID_FILE) {
356
355 if ((ngx_event_flags & NGX_USE_VNODE_EVENT)
356 && of->events
357 && of->fd != NGX_INVALID_FILE)
358 {
357359 file->event = ngx_calloc(sizeof(ngx_event_t), pool->log);
358360 if (file->event== NULL) {
359361 goto failed;
2222
2323 unsigned test_dir:1;
2424 unsigned errors:1;
25 unsigned events:1;
2526
2627 unsigned is_dir:1;
2728 unsigned is_file:1;
108108 of.test_dir = 0;
109109 of.retest = clcf->open_file_cache_retest;
110110 of.errors = clcf->open_file_cache_errors;
111 of.events = clcf->open_file_cache_events;
111112
112113 rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
113114
235235 of.test_dir = 0;
236236 of.retest = clcf->open_file_cache_retest;
237237 of.errors = clcf->open_file_cache_errors;
238 of.events = clcf->open_file_cache_events;
238239
239240 rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
240241
9999 of.test_dir = 0;
100100 of.retest = clcf->open_file_cache_retest;
101101 of.errors = clcf->open_file_cache_errors;
102 of.events = clcf->open_file_cache_events;
102103
103104 rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
104105
640640 of.test_dir = 0;
641641 of.retest = clcf->open_file_cache_retest;
642642 of.errors = clcf->open_file_cache_errors;
643 of.events = clcf->open_file_cache_events;
643644
644645 path.len = ngx_strlen(filename);
645646
468468 ngx_conf_set_flag_slot,
469469 NGX_HTTP_LOC_CONF_OFFSET,
470470 offsetof(ngx_http_core_loc_conf_t, open_file_cache_errors),
471 NULL },
472
473 { ngx_string("open_file_cache_events"),
474 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
475 ngx_conf_set_flag_slot,
476 NGX_HTTP_LOC_CONF_OFFSET,
477 offsetof(ngx_http_core_loc_conf_t, open_file_cache_events),
471478 NULL },
472479
473480 ngx_null_command
23742381 lcf->open_file_cache = NGX_CONF_UNSET_PTR;
23752382 lcf->open_file_cache_retest = NGX_CONF_UNSET;
23762383 lcf->open_file_cache_errors = NGX_CONF_UNSET;
2384 lcf->open_file_cache_events = NGX_CONF_UNSET;
23772385
23782386 return lcf;
23792387 }
25652573
25662574 ngx_conf_merge_sec_value(conf->open_file_cache_errors,
25672575 prev->open_file_cache_errors, 0);
2576
2577 ngx_conf_merge_sec_value(conf->open_file_cache_events,
2578 prev->open_file_cache_events, 0);
25682579
25692580 return NGX_CONF_OK;
25702581 }
292292 ngx_open_file_cache_t *open_file_cache;
293293 time_t open_file_cache_retest;
294294 ngx_flag_t open_file_cache_errors;
295 ngx_flag_t open_file_cache_events;
295296
296297 ngx_log_t *err_log;
297298
976976 of.test_dir = 0;
977977 of.retest = clcf->open_file_cache_retest;
978978 of.errors = clcf->open_file_cache_errors;
979 of.events = clcf->open_file_cache_events;
979980
980981 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
981982 == NGX_ERROR)