Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 2010 10:54:14 +1100
From:      Andrew Snow <als@modulus.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: on st_blksize value
Message-ID:  <4BA954A6.9030505@modulus.org>
In-Reply-To: <4BA8CD21.3000803@freebsd.org>
References:  <4BA8CD21.3000803@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Andriy Gapon wrote:

> One practical benefit can be with ZFS: if a filesystem has recordsize > PAGE_SIZE
> (e.g. default 128K) and it has checksums or compression enabled, then
> (over-)writing in blocks smaller than recordsize would require reading of a whole
> record first. 

Not strictly true: in ZFS the recordsize setting is for the maximum size 
of a record, it can still write smaller than this.  If you overwrite 1K 
in the middle of a 128K record then it should just be writing a 1K 
block.  Each block has its own checksum attached to it so there's no 
need to recalculate checksums for data that isn't changing.


- Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA954A6.9030505>