Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334247
b: refs/heads/master
c: 7ad4d4a
h: refs/heads/master
i:
  334245: d512d18
  334243: 3dee721
  334239: 6c10e80
v: v3
  • Loading branch information
NeilBrown committed Oct 11, 2012
1 parent e627fd8 commit 117333c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd177481b440c3f7b5ee9b821a76b29fdf2a6712
refs/heads/master: 7ad4d4a68a1a19f21c7b39cb3f51bf17fba6e3d0
9 changes: 5 additions & 4 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,10 @@ static void raid1_end_read_request(struct bio *bio, int error)
spin_unlock_irqrestore(&conf->device_lock, flags);
}

if (uptodate)
if (uptodate) {
raid_end_bio_io(r1_bio);
else {
rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
} else {
/*
* oops, read error:
*/
Expand All @@ -349,9 +350,8 @@ static void raid1_end_read_request(struct bio *bio, int error)
(unsigned long long)r1_bio->sector);
set_bit(R1BIO_ReadError, &r1_bio->state);
reschedule_retry(r1_bio);
/* don't drop the reference on read_disk yet */
}

rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
}

static void close_write(struct r1bio *r1_bio)
Expand Down Expand Up @@ -2229,6 +2229,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
unfreeze_array(conf);
} else
md_error(mddev, conf->mirrors[r1_bio->read_disk].rdev);
rdev_dec_pending(conf->mirrors[r1_bio->read_disk].rdev, conf->mddev);

bio = r1_bio->bios[r1_bio->read_disk];
bdevname(bio->bi_bdev, b);
Expand Down

0 comments on commit 117333c

Please sign in to comment.