mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
[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>
This commit is contained in:
parent
d19c2ee0b8
commit
3a0f5bbb1a
1 changed files with 5 additions and 1 deletions
|
@ -389,8 +389,12 @@ static int super_written(struct bio *bio, unsigned int bytes_done, int error)
|
||||||
if (bio->bi_size)
|
if (bio->bi_size)
|
||||||
return 1;
|
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);
|
md_error(mddev, rdev);
|
||||||
|
}
|
||||||
|
|
||||||
if (atomic_dec_and_test(&mddev->pending_writes))
|
if (atomic_dec_and_test(&mddev->pending_writes))
|
||||||
wake_up(&mddev->sb_wait);
|
wake_up(&mddev->sb_wait);
|
||||||
|
|
Loading…
Reference in a new issue