From owner-freebsd-fs@FreeBSD.ORG Tue May 25 19:27:41 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 6BB431065677 for ; Tue, 25 May 2010 19:27:41 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id AF13F8FC1A for ; Tue, 25 May 2010 19:27:40 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4845945E11; Tue, 25 May 2010 21:27:39 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4701945C9F; Tue, 25 May 2010 21:27:34 +0200 (CEST) Date: Tue, 25 May 2010 21:27:21 +0200 From: Pawel Jakub Dawidek To: "James R. Van Artsdalen" Message-ID: <20100525192721.GE1659@garage.freebsd.pl> References: <4BFA9AEC.1070608@jrv.org> <4BFB884A.3010804@jrv.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3oCie2+XPXTnK5a5" Content-Disposition: inline In-Reply-To: <4BFB884A.3010804@jrv.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 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: Tue, 25 May 2010 19:27:41 -0000 --3oCie2+XPXTnK5a5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > 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. Could you try this patch instead: http://people.freebsd.org/~pjd/patches/vdev_geom.c.4.patch > Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 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) !=3D 0) > continue; >=20 > + if ((size % pp->sectorsize) !=3D 0) > + continue; > + > if (vdev_geom_io(cp, BIO_READ, label, offset, size) !=3D = 0) > continue; > buf =3D label->vl_vdev_phys.vp_nvlist; --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --3oCie2+XPXTnK5a5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkv8JJkACgkQForvXbEpPzSBcwCdF8i1d0sT07du0WGhXYpkrEFs SjoAoNwfWGkMNgVs+oKRFc7lPZyaim6N =Nx3D -----END PGP SIGNATURE----- --3oCie2+XPXTnK5a5--