Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2010 17:09:57 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Mikolaj Golub <to.my.trociny@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: hastd: assertion (res->hr_event != NULL) fails in secondary on split-brain
Message-ID:  <20101008150957.GH1733@garage.freebsd.pl>
In-Reply-To: <86lj68n3oi.fsf@zhuzha.ua1>
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>

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

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



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