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.

(cherry picked from commit 5d5f44623eb3d121d528060d131ee5d6bcd63489)

Details

Provenance
avgAuthored on Jan 27 2022, 10:49 AM
Parents
rGe24be8a6b6d6: random(4): update Fortuna generator Chacha20 documentation.
Branches
Unknown
Tags
Unknown