Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 2010 21:27:21 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        "James R. Van Artsdalen" <james-freebsd-fs2@jrv.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS panic: wrong length 131072 for sectorsize 2352
Message-ID:  <20100525192721.GE1659@garage.freebsd.pl>
In-Reply-To: <4BFB884A.3010804@jrv.org>
References:  <4BFA9AEC.1070608@jrv.org> <4BFB884A.3010804@jrv.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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