Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154713
b: refs/heads/master
c: e62e58a
h: refs/heads/master
i:
  154711: 992c0b4
v: v3
  • Loading branch information
NeilBrown committed Jul 1, 2009
1 parent a989863 commit 04bde68
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 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: a5c308d4d1659b1f4833b863394e3e24cdbdfc6e
refs/heads/master: e62e58a5ffdc98ac28d8dbd070c857620d541f99
14 changes: 10 additions & 4 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -6336,10 +6336,16 @@ void md_do_sync(mddev_t *mddev)
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
}

if (j >= mddev->resync_max)
wait_event(mddev->recovery_wait,
mddev->resync_max > j
|| kthread_should_stop());
while (j >= mddev->resync_max && !kthread_should_stop()) {
/* As this condition is controlled by user-space,
* we can block indefinitely, so use '_interruptible'
* to avoid triggering warnings.
*/
flush_signals(current); /* just in case */
wait_event_interruptible(mddev->recovery_wait,
mddev->resync_max > j
|| kthread_should_stop());
}

if (kthread_should_stop())
goto interrupted;
Expand Down
15 changes: 11 additions & 4 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3699,14 +3699,21 @@ static int make_request(struct request_queue *q, struct bio * bi)
goto retry;
}
}
/* FIXME what if we get a false positive because these
* are being updated.
*/

if (bio_data_dir(bi) == WRITE &&
logical_sector >= mddev->suspend_lo &&
logical_sector < mddev->suspend_hi) {
release_stripe(sh);
schedule();
/* As the suspend_* range is controlled by
* userspace, we want an interruptible
* wait.
*/
flush_signals(current);
prepare_to_wait(&conf->wait_for_overlap,
&w, TASK_INTERRUPTIBLE);
if (logical_sector >= mddev->suspend_lo &&
logical_sector < mddev->suspend_hi)
schedule();
goto retry;
}

Expand Down

0 comments on commit 04bde68

Please sign in to comment.