Skip to content

Commit

Permalink
[PATCH] md: add error reporting to superblock write failure
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 3, 2006
1 parent d19c2ee commit 3a0f5bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3a0f5bb

Please sign in to comment.