• Tomasz Majchrzak's avatar
    raid1: handle read error also in readonly mode · 7449f699
    Tomasz Majchrzak authored
    If write is the first operation on a disk and it happens not to be
    aligned to page size, block layer sends read request first. If read
    operation fails, the disk is set as failed as no attempt to fix the
    error is made because array is in auto-readonly mode. Similarily, the
    disk is set as failed for read-only array.
    
    Take the same approach as in raid10. Don't fail the disk if array is in
    readonly or auto-readonly mode. Try to redirect the request first and if
    unsuccessful, return a read error.
    Signed-off-by: default avatarTomasz Majchrzak <tomasz.majchrzak@intel.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    7449f699
raid1.c 87 KB