From: NeilBrown Date: Tue, 3 Oct 2006 08:16:03 +0000 (-0700) Subject: [PATCH] md: add error reporting to superblock write failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a0f5bbb1a36ed113065099d3dc69a66e1c8d567;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] md: add error reporting to superblock write failure Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 40cb79ac403..38a0a5741d5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -389,8 +389,12 @@ static int super_written(struct bio *bio, unsigned int bytes_done, int error) if (bio->bi_size) return 1; - if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) + if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) { + printk("md: super_written gets error=%d, uptodate=%d\n", + error, test_bit(BIO_UPTODATE, &bio->bi_flags)); + WARN_ON(test_bit(BIO_UPTODATE, &bio->bi_flags)); md_error(mddev, rdev); + } if (atomic_dec_and_test(&mddev->pending_writes)) wake_up(&mddev->sb_wait);