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

Commit 13c2088d authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Jens Axboe
Browse files

drbd: finally report ms, not jiffies, in log message



Also skip the message unless bitmap IO took longer than 5 ms.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 4e526a00
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -1121,10 +1121,14 @@ static int bm_rw(struct drbd_device *device, const unsigned int flags, unsigned
		kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy);
		kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy);


	/* summary for global bitmap IO */
	/* summary for global bitmap IO */
	if (flags == 0)
	if (flags == 0) {
		drbd_info(device, "bitmap %s of %u pages took %lu jiffies\n",
		unsigned int ms = jiffies_to_msecs(jiffies - now);
		if (ms > 5) {
			drbd_info(device, "bitmap %s of %u pages took %u ms\n",
				 (flags & BM_AIO_READ) ? "READ" : "WRITE",
				 (flags & BM_AIO_READ) ? "READ" : "WRITE",
			 count, jiffies - now);
				 count, ms);
		}
	}


	if (ctx->error) {
	if (ctx->error) {
		drbd_alert(device, "we had at least one MD IO ERROR during bitmap IO\n");
		drbd_alert(device, "we had at least one MD IO ERROR during bitmap IO\n");