Skip to content

Commit

Permalink
Merge tag 'md/3.15-fixes' of git://neil.brown.name/md
Browse files Browse the repository at this point in the history
Pull md bugfixes from Neil Brown:
 "Two bugfixes for md in 3.15

  Both tagged for -stable"

* tag 'md/3.15-fixes' of git://neil.brown.name/md:
  md: avoid possible spinning md thread at shutdown.
  md/raid10: call wait_barrier() for each request submitted.
  • Loading branch information
Linus Torvalds committed May 13, 2014
2 parents 200d963 + 0f62fb2 commit 2ddb599
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -8516,7 +8516,8 @@ static int md_notify_reboot(struct notifier_block *this,
if (mddev_trylock(mddev)) {
if (mddev->pers)
__md_stop_writes(mddev);
mddev->safemode = 2;
if (mddev->persistent)
mddev->safemode = 2;
mddev_unlock(mddev);
}
need_delay = 1;
Expand Down
13 changes: 7 additions & 6 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,13 @@ static void __make_request(struct mddev *mddev, struct bio *bio)
int max_sectors;
int sectors;

/*
* Register the new request and wait if the reconstruction
* thread has put up a bar for new requests.
* Continue immediately if no resync is active currently.
*/
wait_barrier(conf);

sectors = bio_sectors(bio);
while (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) &&
bio->bi_iter.bi_sector < conf->reshape_progress &&
Expand Down Expand Up @@ -1552,12 +1559,6 @@ static void make_request(struct mddev *mddev, struct bio *bio)

md_write_start(mddev, bio);

/*
* Register the new request and wait if the reconstruction
* thread has put up a bar for new requests.
* Continue immediately if no resync is active currently.
*/
wait_barrier(conf);

do {

Expand Down

0 comments on commit 2ddb599

Please sign in to comment.