summaryrefslogtreecommitdiffhomepage
path: root/src/os/unix/ngx_files.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-08-29 09:51:56 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-08-29 09:51:56 +0000
commit34f579fb6d3c6582a685e65265f332fa8cf83fe8 (patch)
tree015b96a4bc4a5b03f490b81cc4863f83a5dd5745 /src/os/unix/ngx_files.h
parent283936abca079a6f6e6c0dd23b4a5fd45467e96a (diff)
downloadnginx-34f579fb6d3c6582a685e65265f332fa8cf83fe8.tar.gz
nginx-34f579fb6d3c6582a685e65265f332fa8cf83fe8.tar.bz2
Merge of r3966, r3967, r3968, r3969, r3970, r3971:
Cache loader improvements: The cache loader performs two tasks: inserting cache objects in inactivity list and evaluating total cache size. Reading just directory is enough for this purpose. Elimination of reading cache files saves at least one disk I/O operation per file.
Diffstat (limited to 'src/os/unix/ngx_files.h')
-rw-r--r--src/os/unix/ngx_files.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 037c9a165..af41ea38e 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -253,6 +253,7 @@ ngx_de_info(u_char *name, ngx_dir_t *dir)
#define ngx_de_access(dir) (((dir)->info.st_mode) & 0777)
#define ngx_de_size(dir) (dir)->info.st_size
+#define ngx_de_fs_size(dir) ((dir)->info.st_blocks * 512)
#define ngx_de_mtime(dir) (dir)->info.st_mtime