From: JonBailey1993 Date: Mon, 7 Oct 2024 09:39:24 +0000 (+0100) Subject: common/io_exerciser: Add assertion on failure of IO validation X-Git-Tag: v20.0.0~800^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f4e165305f81166ee2a650994ffe0313efe75ab8;p=ceph.git common/io_exerciser: Add assertion on failure of IO validation Assert on failure of IO validation so it's clearer and error has occurred and state of the system will not move beyond the error point. Signed-off-by: Jon Bailey --- diff --git a/src/common/io_exerciser/RadosIo.cc b/src/common/io_exerciser/RadosIo.cc index a28a1e2f488b4..44b82260263a2 100644 --- a/src/common/io_exerciser/RadosIo.cc +++ b/src/common/io_exerciser/RadosIo.cc @@ -154,7 +154,9 @@ void RadosIo::applyIoOp(IoOp &op) version_t ver, bufferlist bl) { ceph_assert(ec == boost::system::errc::success); - db->validate(op_info->bl1, op_info->offset1, op_info->length1); + ceph_assert(db->validate(op_info->bl1, + op_info->offset1, + op_info->length1)); finish_io(); }; librados::async_operate(asio, io, oid, @@ -181,8 +183,12 @@ void RadosIo::applyIoOp(IoOp &op) version_t ver, bufferlist bl) { ceph_assert(ec == boost::system::errc::success); - db->validate(op_info->bl1, op_info->offset1, op_info->length1); - db->validate(op_info->bl2, op_info->offset2, op_info->length2); + ceph_assert(db->validate(op_info->bl1, + op_info->offset1, + op_info->length1)); + ceph_assert(db->validate(op_info->bl2, + op_info->offset2, + op_info->length2)); finish_io(); }; librados::async_operate(asio, io, oid, @@ -210,9 +216,15 @@ void RadosIo::applyIoOp(IoOp &op) version_t ver, bufferlist bl) { ceph_assert(ec == boost::system::errc::success); - db->validate(op_info->bl1, op_info->offset1, op_info->length1); - db->validate(op_info->bl2, op_info->offset2, op_info->length2); - db->validate(op_info->bl3, op_info->offset3, op_info->length3); + ceph_assert(db->validate(op_info->bl1, + op_info->offset1, + op_info->length1)); + ceph_assert(db->validate(op_info->bl2, + op_info->offset2, + op_info->length2)); + ceph_assert(db->validate(op_info->bl3, + op_info->offset3, + op_info->length3)); finish_io(); }; librados::async_operate(asio, io, oid,