]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/md/raid1.c
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
[mirror_ubuntu-jammy-kernel.git] / drivers / md / raid1.c
index bad28520719b3d093ce7106cdaf58a2d733e85f5..0b344d0875814e9ba2a78badb4c8eeabad566bda 100644 (file)
@@ -2449,7 +2449,6 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
        struct mddev *mddev = conf->mddev;
        struct bio *bio;
        struct md_rdev *rdev;
-       sector_t bio_sector;
 
        clear_bit(R1BIO_ReadError, &r1_bio->state);
        /* we got a read error. Maybe the drive is bad.  Maybe just
@@ -2462,7 +2461,6 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
         */
 
        bio = r1_bio->bios[r1_bio->read_disk];
-       bio_sector = conf->mirrors[r1_bio->read_disk].rdev->data_offset + r1_bio->sector;
        bio_put(bio);
        r1_bio->bios[r1_bio->read_disk] = NULL;
 
@@ -2473,6 +2471,8 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
                fix_read_error(conf, r1_bio->read_disk,
                               r1_bio->sector, r1_bio->sectors);
                unfreeze_array(conf);
+       } else if (mddev->ro == 0 && test_bit(FailFast, &rdev->flags)) {
+               md_error(mddev, rdev);
        } else {
                r1_bio->bios[r1_bio->read_disk] = IO_BLOCKED;
        }