Date: Fri, 19 Feb 2010 21:18:50 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Alexander Zagrebin <alexz@visp.ru> Cc: freebsd-current@freebsd.org Subject: Re: ZFS: statfs and recordsize problem Message-ID: <20100219201850.GB1617@garage.freebsd.pl> In-Reply-To: <8630BB25CB8C41E8BF036431AAC9B0A9@vosz.local>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Thu, Feb 18, 2010 at 03:39:28PM +0300, Alexander Zagrebin wrote: > I have noticed, that statfs called for ZFS file systems, > returns the value of FS's recordsize property in both f_bsize and > f_iosize. > > It's a problem for some software. > For example, squid uses block size of cache's file system to calculate > the space occupied by file. > So by default it considers that any small file uses 128KB of a cache > (when default value of recordsize is used), though really this file > may use 512B only. > This miscalculation leads to unreasonable cleaning of a cache. > > IMHO the behavior of statfs have to be changed, as ZFS uses variable > (up to recordsize) block sizes. > It must return 512 as f_bsize and recordsize as f_iosize. > One of possible solutions is the attached patch. > Could somebody look it? I committed (slightly modified version of) your patch to HEAD. Thanks! -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkt+8ikACgkQForvXbEpPzTxbACfSO4TxiwyrRyLBVjfioiU13M8 iPkAnj5XuT2PNvlmkqLmnidwtgeihT7x =cK/Z -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100219201850.GB1617>
