summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2014-04-28 18:43:17 +0200
committerJens Axboe <axboe@fb.com>2014-04-30 21:46:54 +0200
commit6377b9235056452cd5d592c3739baa379a8735fe (patch)
tree9cfef320bf3ef5d649c14f8a8a282d6e20735d18 /drivers/block
parentdrbd: fix stalled resync detection in /proc/drbd (diff)
downloadlinux-6377b9235056452cd5d592c3739baa379a8735fe.tar.xz
linux-6377b9235056452cd5d592c3739baa379a8735fe.zip
drbd: resync: fix too large bursts for very slow rates
While merging adjacent dirty blocks into resync requests, the resync rate throttle was disregarded. For very low resync rates, the effective rate may have exceeded the intended rate by a larger margin. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_worker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 2c4ce42c3657..dcd95a61a8d0 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -647,7 +647,7 @@ next_sector:
*/
align = 1;
rollback_i = i;
- for (;;) {
+ while (i < number) {
if (size + BM_BLOCK_SIZE > max_bio_size)
break;