]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rados: fix the incorrect order of offset,length in WriteOp.zero
authorWang Chao <sean10reborn@gmail.com>
Sat, 10 Aug 2024 11:40:52 +0000 (19:40 +0800)
committerWang Chao <sean10reborn@gmail.com>
Tue, 5 Nov 2024 16:17:19 +0000 (00:17 +0800)
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 <sean10reborn@gmail.com>
src/pybind/rados/rados.pyx

index b54ebb483c6f0f73048f7b941f29cb9f99c47a0a..bcfa6777f3de190b4b98cad3ee5aee610a779d57 100644 (file)
@@ -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):
         """