Skip to content
  • Junichi Nomura's avatar
    dm: fix request-based dm error reporting · 50887bd1
    Junichi Nomura authored
    end_clone_bio() is a endio callback for clone bio and should check
    and save the clone's bi_error for error reporting.  However,
    4246a0b6 ("block: add a bi_error field to struct bio") changed
    the function to check the original bio's bi_error, which is 0.
    
    Without this fix, clone's error is ignored and reported to the
    original request as success.  Thus data corruption will be observed.
    
    Fixes: 4246a0b6
    
     ("block: add a bi_error field to struct bio")
    Signed-off-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    50887bd1