Skip to content

Commit

Permalink
dm raid1: handle read failures
Browse files Browse the repository at this point in the history
This patch gives the ability to respond-to/record device failures
that happen during read operations.  It also adds the ability to
read from mirror devices that are not the primary if they are
in-sync.

There are essentially two read paths in mirroring; the direct path
and the queued path.  When a read request is mapped, if the region
is 'in-sync' the direct path is taken; otherwise the queued path
is taken.

If the direct path is taken, we must record bio information so that
if the read fails we can retry it.  We then discover the status of
a direct read through mirror_end_io.  If the read has failed, we will
mark the device from which the read was attempted as failed (so we
don't try to read from it again), restore the bio and try again.

If the queued path is taken, we discover the results of the read
from 'read_callback'.  If the device failed, we will mark the device
as failed and attempt the read again if there is another device
where this region is known to be 'in-sync'.

Signed-off-by: Jonathan Brassow <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
  • Loading branch information
jbrassow authored and kergon committed Feb 8, 2008
1 parent b80aa7a commit 06386bb
Showing 1 changed file with 211 additions and 45 deletions.
Loading

0 comments on commit 06386bb

Please sign in to comment.