md: identify array and device in metadata write errors
PATCH 1/1 md: identify array and device in metadata write errors
The error log in super_written() does not show which array or device failed. Add both names to help locate the failed write.
--- drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/md.c +2 -1
@@ -1107,11 +1107,12 @@ static void super_written(struct bio *bio) {struct md_rdev *rdev = bio->bi_private;struct mddev *mddev = rdev->mddev;if (bio->bi_status) { -pr_err ("md: %s gets error=%d\n" , __func__, +pr_err ("md: %s: %pg: %s gets error=%d\n" , +mdname (mddev), bio->bi_bdev, __func__,blk_status_to_errno (bio->bi_status));md_error (mddev, rdev);if (!test_bit (Faulty, &rdev->flags) && (bio->bi_opf &MD_FAILFAST )) {set_bit (MD_SB_NEED_REWRITE , &mddev->sb_flags);
Signature · 1 line
2.56.0
Ignore this one please, a apologize for noise because misuse my deprecated e-mail address, thanks.
Quoted 26 lines · Chen Cheng
The error log in
super_written()does not show which array or device failed. Add both names to help locate the failed write.Signed-off-by Chen Cheng <[email protected]>--- drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/md/md.c +2
-1@@ -1107,11 +1107,12 @@ static void super_written(struct bio *bio) {struct md_rdev *rdev = bio->bi_private;struct mddev *mddev = rdev->mddev;if (bio->bi_status) { -pr_err ("md: %s gets error=%d\n" , __func__, +pr_err ("md: %s: %pg: %s gets error=%d\n" , +mdname (mddev), bio->bi_bdev, __func__,blk_status_to_errno (bio->bi_status));md_error (mddev, rdev);if (!test_bit (Faulty, &rdev->flags) && (bio->bi_opf &MD_FAILFAST )) {set_bit (MD_SB_NEED_REWRITE , &mddev->sb_flags);
[email protected] is correct. Please use this submission and disregard the earlier one sent from [email protected]. Sorry for the duplicate.
Quoted 30 lines · Chen Cheng
Ignore this one please, a apologize for noise because misuse my deprecated e-mail address, thanks.
Quoted 26 lines · Chen Cheng
The error log in
super_written()does not show which array or device failed. Add both names to help locate the failed write.Signed-off-by Chen Cheng <[email protected]>--- drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/md/md.c +2
-1@@ -1107,11 +1107,12 @@ static void super_written(struct bio *bio) {struct md_rdev *rdev = bio->bi_private;struct mddev *mddev = rdev->mddev;if (bio->bi_status) { -pr_err ("md: %s gets error=%d\n" , __func__, +pr_err ("md: %s: %pg: %s gets error=%d\n" , +mdname (mddev), bio->bi_bdev, __func__,blk_status_to_errno (bio->bi_status));md_error (mddev, rdev);if (!test_bit (Faulty, &rdev->flags) && (bio->bi_opf &MD_FAILFAST )) {set_bit (MD_SB_NEED_REWRITE , &mddev->sb_flags);