Mercurial > hg > nginx
diff src/os/unix/ngx_files.h @ 3899:e7cd13b7f759
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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 22 Apr 2011 10:06:43 +0000 |
parents | 515d50917016 |
children | 2d05952a324d |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -157,6 +157,7 @@ ngx_int_t ngx_set_file_time(u_char *name #define ngx_is_exec(sb) (((sb)->st_mode & S_IXUSR) == S_IXUSR) #define ngx_file_access(sb) ((sb)->st_mode & 0777) #define ngx_file_size(sb) (sb)->st_size +#define ngx_file_fs_size(sb) ((sb)->st_blocks * 512) #define ngx_file_mtime(sb) (sb)->st_mtime #define ngx_file_uniq(sb) (sb)->st_ino