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-Tag: v20.0.0~369^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=049d7d35abe0aa2560e3bb9d4fafb43eefb4a0ed;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 --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index b54ebb483c6..bcfa6777f3d 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): """