aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYufen Yu <yuyufen@huawei.com>2018-04-23 05:37:30 -0400
committerShaohua Li <shli@fb.com>2018-05-01 12:47:49 -0400
commit13db16d74c02c0e9b2d0dc9b9773c8e58ad41064 (patch)
treef29b1c76106f11f5a5d759b81b339d9c35556c5c
parent83beed7b2b26f232d782127792dd0cd4362fdc41 (diff)
md: fix an error code format and remove unsed bio_sector
Signed-off-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Shaohua Li <shli@fb.com>
-rw-r--r--drivers/md/raid1.c2
-rw-r--r--drivers/md/raid10.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index e9e3308cb0a7..397b3d80c48b 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2450,7 +2450,6 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
2450 struct mddev *mddev = conf->mddev; 2450 struct mddev *mddev = conf->mddev;
2451 struct bio *bio; 2451 struct bio *bio;
2452 struct md_rdev *rdev; 2452 struct md_rdev *rdev;
2453 sector_t bio_sector;
2454 2453
2455 clear_bit(R1BIO_ReadError, &r1_bio->state); 2454 clear_bit(R1BIO_ReadError, &r1_bio->state);
2456 /* we got a read error. Maybe the drive is bad. Maybe just 2455 /* we got a read error. Maybe the drive is bad. Maybe just
@@ -2463,7 +2462,6 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
2463 */ 2462 */
2464 2463
2465 bio = r1_bio->bios[r1_bio->read_disk]; 2464 bio = r1_bio->bios[r1_bio->read_disk];
2466 bio_sector = conf->mirrors[r1_bio->read_disk].rdev->data_offset + r1_bio->sector;
2467 bio_put(bio); 2465 bio_put(bio);
2468 r1_bio->bios[r1_bio->read_disk] = NULL; 2466 r1_bio->bios[r1_bio->read_disk] = NULL;
2469 2467
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 3c60774c8430..64300542ab20 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2363,7 +2363,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
2363{ 2363{
2364 int sect = 0; /* Offset from r10_bio->sector */ 2364 int sect = 0; /* Offset from r10_bio->sector */
2365 int sectors = r10_bio->sectors; 2365 int sectors = r10_bio->sectors;
2366 struct md_rdev*rdev; 2366 struct md_rdev *rdev;
2367 int max_read_errors = atomic_read(&mddev->max_corr_read_errors); 2367 int max_read_errors = atomic_read(&mddev->max_corr_read_errors);
2368 int d = r10_bio->devs[r10_bio->read_slot].devnum; 2368 int d = r10_bio->devs[r10_bio->read_slot].devnum;
2369 2369