From 115e66e9bedaa5d6edfd436fb78aba2c753deeb7 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Thu, 16 Nov 2017 19:16:10 +0000 Subject: [PATCH] device: log debug when I/O bounce buffer used --- lib/device/dev-io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c index 24bc81c5a..35c510f23 100644 --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c @@ -234,6 +234,9 @@ static int _aligned_io(struct device_area *where, char *buffer, !((uintptr_t) buffer & mask)) return _io(where, buffer, should_write); + log_debug_io("Widening request for %" PRIu64 " bytes at %" PRIu64 " to %" PRIu64 " bytes at %" PRIu64 " on %s", + where->size, (uint64_t) where->start, widened.size, (uint64_t) widened.start, dev_name(where->dev)); + /* Allocate a bounce buffer with an extra block */ if (!(bounce_buf = bounce = dm_malloc((size_t) widened.size + block_size))) { log_error("Bounce buffer malloc failed");