From owner-freebsd-fs@FreeBSD.ORG Wed Mar 24 00:09:54 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CAA71065673 for ; Wed, 24 Mar 2010 00:09:54 +0000 (UTC) (envelope-from als@modulus.org) Received: from email.octopus.com.au (email.octopus.com.au [122.100.2.232]) by mx1.freebsd.org (Postfix) with ESMTP id 3FA928FC13 for ; Wed, 24 Mar 2010 00:09:53 +0000 (UTC) Received: by email.octopus.com.au (Postfix, from userid 1002) id 071D85CB91F; Wed, 24 Mar 2010 10:41:10 +1100 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on email.octopus.com.au X-Spam-Level: **** X-Spam-Status: No, score=4.4 required=10.0 tests=ALL_TRUSTED, DNS_FROM_OPENWHOIS,FH_DATE_PAST_20XX autolearn=no version=3.2.3 Received: from [10.1.50.144] (ppp121-45-173-157.lns20.syd6.internode.on.net [121.45.173.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: admin@email.octopus.com.au) by email.octopus.com.au (Postfix) with ESMTP id DA0A05CB8E7; Wed, 24 Mar 2010 10:41:05 +1100 (EST) Message-ID: <4BA954A6.9030505@modulus.org> Date: Wed, 24 Mar 2010 10:54:14 +1100 From: Andrew Snow User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Andriy Gapon References: <4BA8CD21.3000803@freebsd.org> In-Reply-To: <4BA8CD21.3000803@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: on st_blksize value X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 00:09:54 -0000 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