HomeFreeBSD

g_mirror: don't fail reads while losing next-to-last disk

Description

g_mirror: don't fail reads while losing next-to-last disk

I observed a situation where some read requests failed when a 2-way geom
mirror lost one disk. The problem appears to be in the logic that skips
retrying a failed request when a mirror has only one active disk.
Generally, that makes sense. But during a transition from two disks to
one it is possible that the request failed on the failing disk before it
was inactivated and, so, the remaining active disk is the disk that
should be tried.

This change adds an additional check to ensure that it was the (only)
active disk that was already tried.

Reviewed by: mav
MFC after: 3 weeks

Details

Provenance
avgAuthored on Jan 27 2022, 10:49 AM
Parents
rGa95fcd81d571: netpfil tests: re-enable dummynet tests
Branches
Unknown
Tags
Unknown