﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
46	Changeset 3900 st_blocks and ZFS problem	Yasar Semih Alev	somebody	"Hi,

stat->st_blocks give wrong filesize information on FreeBSD with ZFS filesystem. Nginx cache max_size exceed and filesystem is full sometime later. I searched the problem and see the changes in 3900  and i changed this;

#define ngx_file_fs_size(sb)     ((sb)->st_blocks * 512) 
to
#define ngx_file_fs_size(sb)     (sb)->st_size

The problem solved with this change but I know this change for filesize precise and I/O operations but ZFS st_blocks very different. I googled and read some discussions about these. May be same problem occur on Solaris with ZFS filesystem.

Thanks.

Kind Regards,,

Semih Alev"	defect	closed	minor		nginx-core	1.0.x	fixed	st_blocks zfs freebsd		FreeBSD izm-s2 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64	"nginx: nginx version: nginx/1.1.7
nginx: built by gcc 4.2.1 20070719  [FreeBSD]
nginx: TLS SNI support enabled
nginx: configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_secure_link_module --with-http_random_index_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_geoip_module --with-mail --with-debug --with-mail_ssl_module --with-file-aio --with-cc-opt='-O2 -g -m64 -mtune=generic' --add-module=/home/nginx/nginx-1.1.7/ngx_http_bytes_filter_module --add-module=/home/nginx/nginx-1.1.7/nginx-udplog-module --add-module=/home/nginx/nginx-1.1.7/ngx_http_secure_download --add-module=/home/nginx/nginx-1.1.7/ngx_cache_purge
"
