Mercurial > hg > nginx-ranges
comparison src/core/ngx_file.h @ 525:43cc6f0b77ce NGINX_0_8_9
nginx 0.8.9
*) Feature: now the start cache loader runs in a separate process; this
should improve large caches handling.
*) Feature: now temporarily files and permanent storage area may reside
at different file systems.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 17 Aug 2009 00:00:00 +0400 |
parents | 56baf312c1b5 |
children | 7efcdb937752 |
comparison
equal
deleted
inserted
replaced
524:16d97d9e72b7 | 525:43cc6f0b77ce |
---|---|
28 | 28 |
29 #define NGX_MAX_PATH_LEVEL 3 | 29 #define NGX_MAX_PATH_LEVEL 3 |
30 | 30 |
31 | 31 |
32 typedef time_t (*ngx_path_manager_pt) (void *data); | 32 typedef time_t (*ngx_path_manager_pt) (void *data); |
33 typedef void (*ngx_path_loader_pt) (void *data); | |
33 | 34 |
34 | 35 |
35 typedef struct { | 36 typedef struct { |
36 ngx_str_t name; | 37 ngx_str_t name; |
37 size_t len; | 38 size_t len; |
38 size_t level[3]; | 39 size_t level[3]; |
39 | 40 |
40 ngx_path_manager_pt manager; | 41 ngx_path_manager_pt manager; |
42 ngx_path_loader_pt loader; | |
41 void *data; | 43 void *data; |
42 | 44 |
43 u_char *conf_file; | 45 u_char *conf_file; |
44 ngx_uint_t line; | 46 ngx_uint_t line; |
45 } ngx_path_t; | 47 } ngx_path_t; |
69 typedef struct { | 71 typedef struct { |
70 ngx_uint_t access; | 72 ngx_uint_t access; |
71 ngx_uint_t path_access; | 73 ngx_uint_t path_access; |
72 time_t time; | 74 time_t time; |
73 ngx_fd_t fd; | 75 ngx_fd_t fd; |
74 ngx_err_t rename_error; | |
75 | 76 |
76 unsigned create_path:1; | 77 unsigned create_path:1; |
77 unsigned delete_file:1; | 78 unsigned delete_file:1; |
78 unsigned log_rename_error:1; | |
79 | 79 |
80 ngx_log_t *log; | 80 ngx_log_t *log; |
81 } ngx_ext_rename_file_t; | 81 } ngx_ext_rename_file_t; |
82 | |
83 | |
84 typedef struct { | |
85 off_t size; | |
86 size_t buf_size; | |
87 | |
88 ngx_uint_t access; | |
89 time_t time; | |
90 | |
91 ngx_log_t *log; | |
92 } ngx_copy_file_t; | |
82 | 93 |
83 | 94 |
84 typedef struct ngx_tree_ctx_s ngx_tree_ctx_t; | 95 typedef struct ngx_tree_ctx_s ngx_tree_ctx_t; |
85 | 96 |
86 typedef ngx_int_t (*ngx_tree_init_handler_pt) (void *ctx, void *prev); | 97 typedef ngx_int_t (*ngx_tree_init_handler_pt) (void *ctx, void *prev); |
113 ngx_err_t ngx_create_full_path(u_char *dir, ngx_uint_t access); | 124 ngx_err_t ngx_create_full_path(u_char *dir, ngx_uint_t access); |
114 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot); | 125 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot); |
115 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user); | 126 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user); |
116 ngx_int_t ngx_ext_rename_file(ngx_str_t *src, ngx_str_t *to, | 127 ngx_int_t ngx_ext_rename_file(ngx_str_t *src, ngx_str_t *to, |
117 ngx_ext_rename_file_t *ext); | 128 ngx_ext_rename_file_t *ext); |
129 ngx_int_t ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf); | |
118 ngx_int_t ngx_walk_tree(ngx_tree_ctx_t *ctx, ngx_str_t *tree); | 130 ngx_int_t ngx_walk_tree(ngx_tree_ctx_t *ctx, ngx_str_t *tree); |
119 | 131 |
120 void ngx_init_temp_number(void); | 132 void ngx_init_temp_number(void); |
121 ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision); | 133 ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision); |
122 | 134 |