Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8cdfd8d authored by Philipp Reisner's avatar Philipp Reisner
Browse files

drbd: A fixes to the new resync speed code



* Mention P_DELAY_PROBE in the packet naming array
* Do not corrupt the mdev->data.work list in case the timer goes
  off before delay_probe_work got handled by the worker
* Do not mod_timer() twice for a single delay_probe pair

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent eedf386a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,7 @@ static inline const char *cmdname(enum drbd_packets cmd)
		[P_CSUM_RS_REQUEST]     = "CsumRSRequest",
		[P_CSUM_RS_REQUEST]     = "CsumRSRequest",
		[P_RS_IS_IN_SYNC]	= "CsumRSIsInSync",
		[P_RS_IS_IN_SYNC]	= "CsumRSIsInSync",
		[P_COMPRESSED_BITMAP]   = "CBitmap",
		[P_COMPRESSED_BITMAP]   = "CBitmap",
		[P_DELAY_PROBE]         = "DelayProbe",
		[P_MAX_CMD]	        = NULL,
		[P_MAX_CMD]	        = NULL,
	};
	};


+5 −4
Original line number Original line Diff line number Diff line
@@ -2207,9 +2207,6 @@ static int drbd_send_delay_probe(struct drbd_conf *mdev, struct drbd_socket *ds)
	}
	}
	mutex_unlock(&ds->mutex);
	mutex_unlock(&ds->mutex);


	mdev->dp_volume_last = mdev->send_cnt;
	mod_timer(&mdev->delay_probe_timer, jiffies + mdev->sync_conf.dp_interval * HZ / 10);

	return ok;
	return ok;
}
}


@@ -2221,6 +2218,9 @@ static int drbd_send_delay_probes(struct drbd_conf *mdev)
	ok = drbd_send_delay_probe(mdev, &mdev->meta);
	ok = drbd_send_delay_probe(mdev, &mdev->meta);
	ok = ok && drbd_send_delay_probe(mdev, &mdev->data);
	ok = ok && drbd_send_delay_probe(mdev, &mdev->data);


	mdev->dp_volume_last = mdev->send_cnt;
	mod_timer(&mdev->delay_probe_timer, jiffies + mdev->sync_conf.dp_interval * HZ / 10);

	return ok;
	return ok;
}
}


@@ -2374,6 +2374,7 @@ static void delay_probe_timer_fn(unsigned long data)
{
{
	struct drbd_conf *mdev = (struct drbd_conf *) data;
	struct drbd_conf *mdev = (struct drbd_conf *) data;


	if (list_empty(&mdev->delay_probe_work.list))
		drbd_queue_work(&mdev->data.work, &mdev->delay_probe_work);
		drbd_queue_work(&mdev->data.work, &mdev->delay_probe_work);
}
}