]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/io_exerciser: Add assertion on failure of IO validation 59926/head
authorJonBailey1993 <jonathan.bailey1@ibm.com>
Mon, 7 Oct 2024 09:39:24 +0000 (10:39 +0100)
committerJonBailey1993 <jonathan.bailey1@ibm.com>
Tue, 15 Oct 2024 16:02:29 +0000 (17:02 +0100)
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 <jonathan.bailey1@ibm.com>
src/common/io_exerciser/RadosIo.cc

index a28a1e2f488b47c55ca572fff2035c87218db711..44b82260263a209e94cc70881398990be23fddd2 100644 (file)
@@ -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,