From: Lars Ellenberg Date: Mon, 13 Jun 2016 22:26:37 +0000 (+0200) Subject: drbd: finally report ms, not jiffies, in log message X-Git-Tag: v4.8-rc1~161^2~68 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=13c2088d41e9c63e1a484a08a1d250ff74b299b5;p=karo-tx-linux.git drbd: finally report ms, not jiffies, in log message Also skip the message unless bitmap IO took longer than 5 ms. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 095625beaf98..0807fcbf863d 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -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); /* summary for global bitmap IO */ - if (flags == 0) - drbd_info(device, "bitmap %s of %u pages took %lu jiffies\n", - (flags & BM_AIO_READ) ? "READ" : "WRITE", - count, jiffies - now); + if (flags == 0) { + 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", + count, ms); + } + } if (ctx->error) { drbd_alert(device, "we had at least one MD IO ERROR during bitmap IO\n");