summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_cache.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-04-22 10:06:43 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-04-22 10:06:43 +0000
commitef1f33b0db5a69afeb4272668089ed5f760aea68 (patch)
tree5d654c5adb83ebb96f990ff3ae85930fc354fc8c /src/http/ngx_http_cache.h
parent64efecc2b5e6824422703a4fd5106c70d4704ef0 (diff)
downloadnginx-ef1f33b0db5a69afeb4272668089ed5f760aea68.tar.gz
nginx-ef1f33b0db5a69afeb4272668089ed5f760aea68.tar.bz2
Use more precise stat.st_blocks to account cache size on Unix
instead of file length rounded to a file system block size. There is no similar way on Windows, so rounding to a cache->bsize is kept.
Diffstat (limited to '')
-rw-r--r--src/http/ngx_http_cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h
index b511a0b91..3cf113f4a 100644
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -50,7 +50,7 @@ typedef struct {
time_t expire;
time_t valid_sec;
size_t body_start;
- off_t length;
+ off_t fs_size;
} ngx_http_file_cache_node_t;
@@ -68,6 +68,7 @@ struct ngx_http_cache_s {
size_t header_start;
size_t body_start;
off_t length;
+ off_t fs_size;
ngx_uint_t min_uses;
ngx_uint_t error;