From owner-freebsd-fs@FreeBSD.ORG Fri Oct 8 15:10:33 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 66EEB1065774 for ; Fri, 8 Oct 2010 15:10:33 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDAE8FC1B for ; Fri, 8 Oct 2010 15:10:32 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8C5B745C9C; Fri, 8 Oct 2010 17:10:30 +0200 (CEST) Received: from localhost (chello089073192049.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 85A0145C9B; Fri, 8 Oct 2010 17:10:23 +0200 (CEST) Date: Fri, 8 Oct 2010 17:09:57 +0200 From: Pawel Jakub Dawidek To: Mikolaj Golub Message-ID: <20101008150957.GH1733@garage.freebsd.pl> References: <86hbh44wgl.fsf@kopusha.home.net> <86aamw4l42.fsf@kopusha.home.net> <20101004213647.GK7322@garage.freebsd.pl> <86tyl1m85y.fsf@zhuzha.ua1> <20101005074736.GM7322@garage.freebsd.pl> <20101007182436.GB1733@garage.freebsd.pl> <86lj68n3oi.fsf@zhuzha.ua1> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X+nYw8KZ/oNxZ8JS" Content-Disposition: inline In-Reply-To: <86lj68n3oi.fsf@zhuzha.ua1> 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=-2.6 required=4.5 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: hastd: assertion (res->hr_event != NULL) fails in secondary on split-brain 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: Fri, 08 Oct 2010 15:10:33 -0000 --X+nYw8KZ/oNxZ8JS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 08, 2010 at 05:45:49PM +0300, Mikolaj Golub wrote: > But to test I had to run hastd with two changes. The first was needed to = fix > the issue that described in Subject :-) (adding (res->hr_event !=3D NULL)= check > in child_cleanup() -- you wrote that the fix was correct but did not comm= it > it).=20 Ah, right, thanks for the reminder! > The second one was needed to fix the issue that I observed after the late= st > commit r213533: >=20 > Oct 8 16:14:04 hasta hastd[2175]: [storage] (primary) G_GATE_CMD_START f= ailed: Invalid argument. > Oct 8 16:14:04 hasta kernel: Version mismatch 0 !=3D 2. >=20 > Zerroing hio->hio_ggio we clear version and data pointer. This looks wron= g for > me -- they are set and allocated in init_environment(). Also it looks like > setting ggio->gctl_length =3D MAXPHYS is not needed here too. See the att= ached > patch. Zeroing ggio is indeed a bug, but setting gctl_length to MAXPHYS is correct. By setting it for G_GATE_CMD_START we declare how much memory do we have in the passed buffer and the GEOM_GATE class updates this field with the I/O request size, so we need to set gctl_length back to MAXPHYS before every G_GATE_CMD_START. We could remove setting it from init_environment(), but I kinda like it there for consistency. All should be now committed, thanks! --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --X+nYw8KZ/oNxZ8JS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyvNEUACgkQForvXbEpPzRJlwCeJXpaszitDzBX8ljFGA+Pa+g0 zvcAoJE/xon0WQcuQkzRq1WVmBO22gUW =GaQz -----END PGP SIGNATURE----- --X+nYw8KZ/oNxZ8JS--