From owner-freebsd-fs@FreeBSD.ORG Wed May 26 11:15:44 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 A57D6106564A; Wed, 26 May 2010 11:15:44 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B62528FC1A; Wed, 26 May 2010 11:15:43 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA22256; Wed, 26 May 2010 14:15:41 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BFD02DC.1050203@icyb.net.ua> Date: Wed, 26 May 2010 14:15:40 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100517) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4BFA9AEC.1070608@jrv.org> <4BFB884A.3010804@jrv.org> <20100525192721.GE1659@garage.freebsd.pl> In-Reply-To: <20100525192721.GE1659@garage.freebsd.pl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS panic: wrong length 131072 for sectorsize 2352 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, 26 May 2010 11:15:44 -0000 on 25/05/2010 22:27 Pawel Jakub Dawidek said the following: > On Tue, May 25, 2010 at 03:20:26AM -0500, James R. Van Artsdalen wrote: >> On 5/24/2010 10:27 AM, James R. Van Artsdalen wrote: >>> panic: wrong length 131072 for sectorsize 2352 >> This fixes the bug. > > I don't think so:) size should be properly calculated at this point and > should be multiple of sectorsize. The problem is that vdev_geom_io() > splits request into MAXPHYS chunks if it is too big, which is wrong, > because MAXPHYS doesn't have to be multiple of sectorsize. But do we really want to support here sector sizes that are not power of two? And/or MAXPHYS which is not power of two? > Could you try this patch instead: > > http://people.freebsd.org/~pjd/patches/vdev_geom.c.4.patch Otherwise MAXPHYS % cp->provider->sectorsize would always be zero. >> Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c >> =================================================================== >> --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c (revision 208373) >> +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c (working copy) >> @@ -250,6 +250,9 @@ >> if ((offset % pp->sectorsize) != 0) >> continue; >> >> + if ((size % pp->sectorsize) != 0) >> + continue; >> + >> if (vdev_geom_io(cp, BIO_READ, label, offset, size) != 0) >> continue; >> buf = label->vl_vdev_phys.vp_nvlist; > -- Andriy Gapon