summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-10-19 14:37:47 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 14:11:43 +0100
commit328e0f125bf41f4f33f684db22015f92cb44fe56 (patch)
tree364b7292db9d7072130080589b579e3fdadf23e6 /drivers/block/drbd/drbd_nl.c
parent518a4d53b2985451a08cb4e5b79deacfe151a38a (diff)
downloadlinux-328e0f125bf41f4f33f684db22015f92cb44fe56.tar.bz2
drbd: Broadcast sync progress no more often than once per second
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 298dd3e35e02..d339a2754a85 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3295,6 +3295,12 @@ void drbd_bcast_event(struct drbd_conf *mdev, const struct sib_info *sib)
unsigned seq;
int err = -ENOMEM;
+ if (sib->sib_reason == SIB_SYNC_PROGRESS &&
+ time_after(jiffies, mdev->rs_last_bcast + HZ))
+ mdev->rs_last_bcast = jiffies;
+ else
+ return;
+
seq = atomic_inc_return(&drbd_genl_seq);
msg = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
if (!msg)