https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232671

--- Comment #3 from Conrad Meyer <c...@freebsd.org> ---
(In reply to Mark Johnston from comment #2)
Yep, I did this code inspection on CURRENT from yesterday-ish, so that revision
was present.

I'm not sure I want us to flip flop between STARTING and RUNNING in such a
case; it seems like both (1) we are allowed to remain in STARTING indefinitely
by just returning (as long as we can expect some future event to potentially
transition us to RUNNING), and (2) we have enough information at STARTING time
to know that RUNNING will fail.  I.e., I'd like to be slightly more
conservative about when we transition to RUNNING.

As far as particular code change for the root cause, adding a check for `if
(ndisks == 0) return;` right before the 'if (dirty == 0) {' check seems like it
*might* be sufficient to fix the correctness issue here (although not the
admin-introspection issue(s)).  After all, there is no point launching a
gmirror with only broken and synchronizing disks ;-).

Additionally, for administrability I'd like to record some information on the
mirror softc about *why* the state is what it is.  (Possibly at least two
formatted string buffers -- why we last transitioned, and why we haven't yet
transitioned to the next logical state.  If either is not relevant, "n/a" would
be ok.)  That way, when we timeout or whatever, that is discoverable (and
ideally printed to console).

It might also make sense to do a similar thing for g_mirror_disks.  It'd also
be good to add gmirror disk id to almost all of these log messages, since daNN
devices can be enumerated in a different order between boots, and that was
super confusing for this sighting.

Certainly adding more test cases would be a good idea along with this revision,
thanks for the pointer.

I can't promise any time to work on right now, sorry.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to