Mercurial > hg > nginx-vendor-current
diff src/core/ngx_file.h @ 514: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 |
line wrap: on
line diff
--- a/src/core/ngx_file.h +++ b/src/core/ngx_file.h @@ -30,6 +30,7 @@ struct ngx_file_s { typedef time_t (*ngx_path_manager_pt) (void *data); +typedef void (*ngx_path_loader_pt) (void *data); typedef struct { @@ -38,6 +39,7 @@ typedef struct { size_t level[3]; ngx_path_manager_pt manager; + ngx_path_loader_pt loader; void *data; u_char *conf_file; @@ -71,16 +73,25 @@ typedef struct { ngx_uint_t path_access; time_t time; ngx_fd_t fd; - ngx_err_t rename_error; unsigned create_path:1; unsigned delete_file:1; - unsigned log_rename_error:1; ngx_log_t *log; } ngx_ext_rename_file_t; +typedef struct { + off_t size; + size_t buf_size; + + ngx_uint_t access; + time_t time; + + ngx_log_t *log; +} ngx_copy_file_t; + + typedef struct ngx_tree_ctx_s ngx_tree_ctx_t; typedef ngx_int_t (*ngx_tree_init_handler_pt) (void *ctx, void *prev); @@ -115,6 +126,7 @@ ngx_int_t ngx_add_path(ngx_conf_t *cf, n ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user); ngx_int_t ngx_ext_rename_file(ngx_str_t *src, ngx_str_t *to, ngx_ext_rename_file_t *ext); +ngx_int_t ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf); ngx_int_t ngx_walk_tree(ngx_tree_ctx_t *ctx, ngx_str_t *tree); void ngx_init_temp_number(void);