Mercurial > hg > nginx-vendor-0-7
annotate src/core/ngx_open_file_cache.h @ 366:babd3d9efb62 NGINX_0_6_27
nginx 0.6.27
*) Change: now by default the rtsig method is not built on
Linux 2.6.18+.
*) Change: now a request method is not changed while redirection to a
named location via an "error_page" directive.
*) Feature: the "resolver" and "resolver_timeout" directives in SMTP
proxy.
*) Feature: the "post_action" directive supports named locations.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: browsers did not repeat SSL handshake if there is no valid
client certificate in first handshake.
Thanks to Alexander V. Inyukhin.
*) Bugfix: if response code 495-497 was redirected via an "error_page"
directive without code change, then nginx tried to allocate too many
memory.
*) Bugfix: memory leak in long-lived non buffered connections.
*) Bugfix: memory leak in resolver.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: in the $proxy_host and $proxy_port variables caching.
Thanks to Sergey Bochenkov.
*) Bugfix: a "proxy_pass" directive with variables used incorrectly the
same port as in another "proxy_pass" directive with the same host
name and without variables.
Thanks to Sergey Bochenkov.
*) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some
64-bit platforms while reconfiguration.
*) Bugfix: a segmentation fault occurred in worker process, if empty
stub block was used second time in SSI.
*) Bugfix: in copying URI part contained escaped symbols into arguments.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Mar 2008 00:00:00 +0300 |
parents | 9121a0a91f47 |
children | 12defd37f578 |
rev | line source |
---|---|
332 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
11 #ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_ | |
12 #define _NGX_OPEN_FILE_CACHE_H_INCLUDED_ | |
13 | |
14 | |
15 typedef struct { | |
16 ngx_fd_t fd; | |
17 ngx_file_uniq_t uniq; | |
18 time_t mtime; | |
19 off_t size; | |
20 ngx_err_t err; | |
21 | |
358 | 22 time_t valid; |
23 | |
24 ngx_uint_t min_uses; | |
332 | 25 |
26 unsigned test_dir:1; | |
27 unsigned errors:1; | |
28 unsigned events:1; | |
29 | |
30 unsigned is_dir:1; | |
31 unsigned is_file:1; | |
32 unsigned is_link:1; | |
33 unsigned is_exec:1; | |
34 } ngx_open_file_info_t; | |
35 | |
36 | |
37 typedef struct ngx_cached_open_file_s ngx_cached_open_file_t; | |
38 | |
39 struct ngx_cached_open_file_s { | |
40 ngx_rbtree_node_t node; | |
358 | 41 ngx_queue_t queue; |
332 | 42 |
43 u_char *name; | |
44 time_t created; | |
45 time_t accessed; | |
46 | |
47 ngx_fd_t fd; | |
48 ngx_file_uniq_t uniq; | |
49 time_t mtime; | |
50 off_t size; | |
51 ngx_err_t err; | |
52 | |
358 | 53 uint32_t uses; |
54 | |
332 | 55 unsigned count:24; |
56 unsigned close:1; | |
358 | 57 unsigned use_event:1; |
332 | 58 |
59 unsigned is_dir:1; | |
60 unsigned is_file:1; | |
61 unsigned is_link:1; | |
62 unsigned is_exec:1; | |
63 | |
64 ngx_event_t *event; | |
65 }; | |
66 | |
67 | |
68 typedef struct { | |
69 ngx_rbtree_t rbtree; | |
358 | 70 ngx_rbtree_node_t sentinel; |
71 ngx_queue_t expire_queue; | |
332 | 72 |
73 ngx_uint_t current; | |
74 ngx_uint_t max; | |
75 time_t inactive; | |
76 } ngx_open_file_cache_t; | |
77 | |
78 | |
79 typedef struct { | |
80 ngx_open_file_cache_t *cache; | |
81 ngx_cached_open_file_t *file; | |
358 | 82 ngx_uint_t min_uses; |
332 | 83 ngx_log_t *log; |
84 } ngx_open_file_cache_cleanup_t; | |
85 | |
86 | |
87 typedef struct { | |
88 | |
89 /* ngx_connection_t stub to allow use c->fd as event ident */ | |
90 void *data; | |
91 ngx_event_t *read; | |
92 ngx_event_t *write; | |
93 ngx_fd_t fd; | |
94 | |
95 ngx_cached_open_file_t *file; | |
96 ngx_open_file_cache_t *cache; | |
97 } ngx_open_file_cache_event_t; | |
98 | |
99 | |
100 ngx_open_file_cache_t *ngx_open_file_cache_init(ngx_pool_t *pool, | |
101 ngx_uint_t max, time_t inactive); | |
102 ngx_int_t ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, | |
103 ngx_open_file_info_t *of, ngx_pool_t *pool); | |
104 | |
105 | |
106 #endif /* _NGX_OPEN_FILE_CACHE_H_INCLUDED_ */ |