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
[-- Attachment #1 --] 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 != NULL) check > in child_cleanup() -- you wrote that the fix was correct but did not commit > it). Ah, right, thanks for the reminder! > The second one was needed to fix the issue that I observed after the latest > commit r213533: > > Oct 8 16:14:04 hasta hastd[2175]: [storage] (primary) G_GATE_CMD_START failed: Invalid argument. > Oct 8 16:14:04 hasta kernel: Version mismatch 0 != 2. > > Zerroing hio->hio_ggio we clear version and data pointer. This looks wrong for > me -- they are set and allocated in init_environment(). Also it looks like > setting ggio->gctl_length = MAXPHYS is not needed here too. See the attached > 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! -- Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyvNEUACgkQForvXbEpPzRJlwCeJXpaszitDzBX8ljFGA+Pa+g0 zvcAoJE/xon0WQcuQkzRq1WVmBO22gUW =GaQz -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101008150957.GH1733>
