From 63146ca08b89c6b1e28e889574fbfba28864b5b3 Mon Sep 17 00:00:00 2001 From: Alexander Indenbaum Date: Mon, 4 Aug 2025 10:53:45 +0300 Subject: [PATCH] librbd: add debug logs Signed-off-by: Alexander Indenbaum --- src/librbd/librbd.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/librbd/librbd.cc b/src/librbd/librbd.cc index 8e43f33394f..eba154c8bbd 100644 --- a/src/librbd/librbd.cc +++ b/src/librbd/librbd.cc @@ -6421,16 +6421,24 @@ extern "C" int rbd_aio_write_with_crc32c(rbd_image_t image, uint64_t off, uint32_t precomputed_crc32c, rbd_completion_t c, int op_flags) { + printf("DEBUG: rbd_aio_write_with_crc32c called - off=%lu, len=%zu, crc32c=%u\n", + off, len, precomputed_crc32c); + librbd::ImageCtx *ictx = (librbd::ImageCtx *)image; librbd::RBD::AioCompletion *comp = (librbd::RBD::AioCompletion *)c; tracepoint(librbd, aio_write_with_crc32c_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only, off, len, buf, precomputed_crc32c, comp->pc, op_flags); + printf("DEBUG: Creating write raw with CRC32C\n"); auto aio_completion = get_aio_completion(comp); bufferlist bl; bl.push_back(create_write_raw_with_crc32c(ictx, buf, len, precomputed_crc32c, aio_completion)); + + printf("DEBUG: Calling aio_write\n"); librbd::api::Io<>::aio_write( *ictx, aio_completion, off, len, std::move(bl), op_flags, true); + + printf("DEBUG: rbd_aio_write_with_crc32c completed\n"); tracepoint(librbd, aio_write_exit, 0); return 0; } -- 2.39.5