]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: minor refinement to remap_pin() asserts 57320/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 8 Mar 2024 07:48:06 +0000 (15:48 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 7 May 2024 11:27:07 +0000 (14:27 +0300)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 2d2df50e24d5a4dc3806b725e8b43cc0fcd1e3c4)

src/crimson/os/seastore/transaction_manager.h

index 640b98f794263382e55d30fb5e3c40ec0a4841dc..9532b6160e999ebcc524b22195874434103d10fe 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