From: Lucian Petrut Date: Thu, 21 Jan 2021 12:13:04 +0000 (+0000) Subject: rbd: fix offset overflow on Windows X-Git-Tag: v16.2.0~239^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7b992bc169ff91d55e83eae65e9208e0432808e;p=ceph.git 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 (cherry picked from commit 784e0356cac3dbf4935ef5afe088d98e4a3577d8) --- diff --git a/src/tools/rbd_wnbd/wnbd_handler.h b/src/tools/rbd_wnbd/wnbd_handler.h index 3fcdbdd5a11a..a5c042f58026 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()