From 784e0356cac3dbf4935ef5afe088d98e4a3577d8 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Thu, 21 Jan 2021 12:13:04 +0000 Subject: [PATCH] rbd: fix offset overflow on Windows The rbd-wnbd daemon overflows when writing passed 4GB as the offset field incorrectly uses uint32_t (initial versions of the rbd-wnbd proposal used block increments). This change updates the IO offset type to use uint64_t. Signed-off-by: Lucian Petrut --- src/tools/rbd_wnbd/wnbd_handler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd_wnbd/wnbd_handler.h b/src/tools/rbd_wnbd/wnbd_handler.h index 3fcdbdd5a11..a5c042f5802 100644 --- a/src/tools/rbd_wnbd/wnbd_handler.h +++ b/src/tools/rbd_wnbd/wnbd_handler.h @@ -128,8 +128,8 @@ private: WnbdRequestType req_type = WnbdReqTypeUnknown; uint64_t req_handle = 0; uint32_t err_code = 0; - uint32_t req_size; - uint32_t req_from; + size_t req_size; + uint64_t req_from; bufferlist data; IOContext() -- 2.47.3