From owner-freebsd-fs@FreeBSD.ORG Fri Nov 7 07:31:08 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E1CE4E6 for ; Fri, 7 Nov 2014 07:31:08 +0000 (UTC) Received: from cu01176b.smtpx.saremail.com (cu01176b.smtpx.saremail.com [195.16.151.151]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD52566D for ; Fri, 7 Nov 2014 07:31:07 +0000 (UTC) Received: from [172.16.2.2] (izaro.sarenet.es [192.148.167.11]) by proxypop04.sare.net (Postfix) with ESMTPSA id C22169DF17A; Fri, 7 Nov 2014 08:31:03 +0100 (CET) Subject: Re: ZFS bug: was creating ZIL ignores vfs.zfs.min_auto_ashift, should be ZIL sets improper ashift with AHCI controllers Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Borja Marcos In-Reply-To: <545BE3E0.4030203@multiplay.co.uk> Date: Fri, 7 Nov 2014 08:31:00 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <757B9039-8DF0-4E6A-A036-82A2143D7F45@sarenet.es> References: <9C91F97841BC4347910F206618BAA3BB9AF327D1@PAIMAIL.pai.local> <545B76EF.6050709@multiplay.co.uk> <21D2A3A9-B6C1-458F-B17F-480251E999AE@sarenet.es> <545BE3E0.4030203@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1283) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2014 07:31:08 -0000 On Nov 6, 2014, at 10:10 PM, Steven Hartland wrote: > On 06/11/2014 14:58, Borja Marcos wrote: > Ok narrowed down the issue, looks like cache file generation is where = the issue is, possibly a race condition. Hmm and you mentioned a boot pool and a not boot pool. Certainly, that's = another difference :/ I wrongly blamed the controlled difference because I directly suspected the quirks mechanism. > If you run the following then rerun your zdb I suspect you'll get the = right results (ashift: 12) > zpool set cachefile=3D'' >=20 > Alternatively you can run the following to display real pool config vs = that which is in the cache file: > zdb -C Let's see # zpool add rpool log ada1 # zdb|fgrep ashift ashift: 12 ashift: 9 ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 ada1: ATA-8 SATA 2.x device ada1: Serial Number PEPR408501DV040AGN ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 38166MB (78165360 512 byte sectors: 16H 63S/T 16383C) ada1: quirks=3D0x1<4K> And now, # zdb -C rpool|fgrep ashift ashift: 12 ashift: 12 You are right! This time I had not altered min_auto_ashift but I had added a quirk to = ata_da.c. So it correctly used the quirk sector size to adjust ashift.=20 Seems the bug should be "improper cache file generation for a pool used = for boot". I'll see if I can run some more tests. Thanks! Borja.