]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: minor refinement to remap_pin() asserts 56028/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 8 Mar 2024 07:48:06 +0000 (15:48 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 8 Mar 2024 07:50:14 +0000 (15:50 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/transaction_manager.h

index 28524592eaef37e73d7059a9f231102cdf56b32e..f11967fd6042228d3d452be71a7ec065f553f4e2 100644 (file)
@@ -425,12 +425,17 @@ public:
     for (auto &remap : remaps) {
       auto remap_offset = remap.offset;
       auto remap_len = remap.len;
+      assert(remap_len > 0);
       total_remap_len += remap.len;
-      ceph_assert(remap_offset >= (last_offset + last_len));
+      assert(remap_offset >= (last_offset + last_len));
       last_offset = remap_offset;
       last_len = remap_len;
     }
-    ceph_assert(total_remap_len < original_len);
+    if (remaps.size() == 1) {
+      assert(total_remap_len < original_len);
+    } else {
+      assert(total_remap_len <= original_len);
+    }
 #endif
 
     // FIXME: paddr can be absolute and pending