diff src/os/unix/ngx_files.h @ 4038:30519bb5621d stable-1.0

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.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 29 Aug 2011 09:51:56 +0000
parents e7cd13b7f759
children f72496073689
line wrap: on
line diff
--- 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