diff options
author | NeilBrown <neilb@suse.de> | 2006-10-03 04:16:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:19 -0400 |
commit | 3a0f5bbb1a36ed113065099d3dc69a66e1c8d567 (patch) | |
tree | 0a8e6aa5c069aa41e57cbe820f0876abea4e8876 /drivers/md/md.c | |
parent | d19c2ee0b8d1cd83f8bc0f1f5e94e6b6ec71ea10 (diff) |
[PATCH] md: add error reporting to superblock write failure
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 40cb79ac4039..38a0a5741d52 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) | |||
389 | if (bio->bi_size) | 389 | if (bio->bi_size) |
390 | return 1; | 390 | return 1; |
391 | 391 | ||
392 | if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) | 392 | if (error || !test_bit(BIO_UPTODATE, &bio->bi_flags)) { |
393 | printk("md: super_written gets error=%d, uptodate=%d\n", | ||
394 | error, test_bit(BIO_UPTODATE, &bio->bi_flags)); | ||
395 | WARN_ON(test_bit(BIO_UPTODATE, &bio->bi_flags)); | ||
393 | md_error(mddev, rdev); | 396 | md_error(mddev, rdev); |
397 | } | ||
394 | 398 | ||
395 | if (atomic_dec_and_test(&mddev->pending_writes)) | 399 | if (atomic_dec_and_test(&mddev->pending_writes)) |
396 | wake_up(&mddev->sb_wait); | 400 | wake_up(&mddev->sb_wait); |