• Jonathan Brassow's avatar
    dm raid1: handle log failure · fc1ff958
    Jonathan Brassow authored
    When writing to a mirror, the log must be updated first.  Failure
    to update the log could result in the log not properly reflecting
    the state of the mirror if the machine should crash.
    
    We change the return type of the rh_flush function to give us
    the ability to check if a log write was successful.  If the
    log write was unsuccessful, we fail the writes to avoid the
    case where the log does not properly reflect the state of the
    mirror.
    
    A follow-up patch - which is dependent on the ability to
    requeue I/O's to core device-mapper - will requeue the I/O's
    for retry (allowing the mirror to be reconfigured.)
    Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    fc1ff958
dm-raid1.c 31.9 KB