mod_timer() takes an absolute jiffies value, but both callers pass a relative one. After about 5 min uptime this causes the timer to fire and re-arm on every tick. This has not exploded because we still have checked pb->deadline_jiffies each time.
https://virtuozzo.atlassian.net/browse/VSTOR-152912 Signed-off-by: Andrey Zhadchenko <[email protected]> --- v2: no changes drivers/md/dm-push-backup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c index 8ce84a1a696e5..b1861204f6e3e 100644 --- a/drivers/md/dm-push-backup.c +++ b/drivers/md/dm-push-backup.c @@ -244,7 +244,7 @@ static void pb_timer_func(struct timer_list *timer) spin_unlock_irqrestore(&pb->lock, flags); if (unlikely(time_before64(now, deadline))) - mod_timer(timer, deadline - now + 1); + mod_timer(timer, jiffies + (deadline - now) + 1); else queue_work(pb->wq, &pb->worker); } @@ -278,7 +278,7 @@ static int postpone_if_required_for_backup(struct push_backup *pb, spin_unlock_irqrestore(&pb->lock, flags); if (queue_timer) - mod_timer(&pb->deadline_timer, pb->timeout_in_jiffies + 1); + mod_timer(&pb->deadline_timer, jiffies + pb->timeout_in_jiffies + 1); rcu_read_unlock(); if (queue_timer) -- 2.43.5 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
