• Shaohua Li's avatar
    RAID10: ignore discard error · eba4fe9d
    Shaohua Li authored
    commit 579ed34f upstream.
    
    This is the counterpart of raid10 fix. If a write error occurs, raid10
    will try to rewrite the bio in small chunk size. If the rewrite fails,
    raid10 will record the error in bad block. narrow_write_error will
    always use WRITE for the bio, but actually it could be a discard. Since
    discard bio hasn't payload, write the bio will cause different issues.
    But discard error isn't fatal, we can safely ignore it. This is what
    this patch does.
    
    This issue should exist since discard is added, but only exposed with
    recent arbitrary bio size feature.
    
    Cc: Sitsofe Wheeler <sitsofe@gmail.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    eba4fe9d
raid10.c 130 KB