diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-08-12 12:05:33 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-08-12 12:05:33 +0000 |
commit | b7a09c55239a92201665781f2ffdc388fafa598f (patch) | |
tree | 316d43b0d8e21c7fe9445954456184aec3659b98 /src/core/ngx_file.h | |
parent | c9538c069f95043d9a922a7ca3d311f7e2b7fde7 (diff) | |
download | nginx-b7a09c55239a92201665781f2ffdc388fafa598f.tar.gz nginx-b7a09c55239a92201665781f2ffdc388fafa598f.zip |
allow cross device temporary files atomic copying:
*) ngx_copy_file()
*) delete ngx_ext_rename_file_t.log_rename_error and .rename_error fields
Diffstat (limited to 'src/core/ngx_file.h')
-rw-r--r-- | src/core/ngx_file.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h index 7768e48e1..0da8646eb 100644 --- a/src/core/ngx_file.h +++ b/src/core/ngx_file.h @@ -73,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); @@ -117,6 +126,7 @@ ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot); 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); |