From: Wang Chao Date: Sat, 10 Aug 2024 11:40:52 +0000 (+0800) Subject: pybind/rados: fix the incorrect order of offset,length in WriteOp.zero X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82379dbf03710d443066b0958b19547b37706d52;p=ceph.git pybind/rados: fix the incorrect order of offset,length in WriteOp.zero The offset and length parameters in the rados pybind `WriteOp.zero()` method are being passed to the rados_write_op_zero() function in the incorrect order. Incorrect order cause OP_ZERO not work correctly when use pybind's rados. Signed-off-by: Wang Chao (cherry picked from commit 049d7d35abe0aa2560e3bb9d4fafb43eefb4a0ed) --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index b54ebb483c6f..bcfa6777f3de 100644 --- a/src/pybind/rados/rados.pyx +++ b/src/pybind/rados/rados.pyx @@ -1870,7 +1870,7 @@ cdef class WriteOp(object): uint64_t _offset = offset with nogil: - rados_write_op_zero(self.write_op, _length, _offset) + rados_write_op_zero(self.write_op, _offset, _length) def truncate(self, offset: int): """