]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: fix resync throttling initialization
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 10 Nov 2014 16:21:12 +0000 (17:21 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 10 Nov 2014 16:27:37 +0000 (09:27 -0700)
commitc67a3e6ddd14997aee9c7b0662c4b30750d00220
treef142942ea9b5529bc82591da749eee816f56d4bc
parent23c8e234c116d684e0aa0fdac747f7817d651eff
drbd: fix resync throttling initialization

If for some reason DRBD resync was the only activity on a backend
device, drbd_rs_c_min_rate_throttle() would mistakenly decide that it is
still initialization time, and keep throttling the resync.

This patch explicitly initializes ->rs_last_events to the current
backend event counters, and drops the rs_last_events == 0 from the
throttle condition.

Reported-by: Mikhail Sugakov <msugakov@amazon.de>
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>
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_state.c
drivers/block/drbd/drbd_worker.c