hastd: assertion (res->hr_event != NULL) fails in secondary on split-brain

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Oct 8 15:10:33 UTC 2010


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 at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20101008/3227e187/attachment.pgp


More information about the freebsd-fs mailing list