]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/seastore_types: tolerate fake paddrs as absolute addresses
authorYingxin Cheng <yingxin.cheng@intel.com>
Wed, 23 Apr 2025 09:27:04 +0000 (17:27 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 25 Apr 2025 01:20:34 +0000 (09:20 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/seastore_types.h

index f797321e1fb56c9244c4a9ab9a4746f5083f2532..1d9cfc39563faf080c3599881beab5a577832089 100644 (file)
@@ -643,8 +643,21 @@ public:
     return get_device_id() == DEVICE_ID_ROOT;
   }
 
+  /**
+   * is_absolute()
+   *
+   * indicates whether addr reflects an absolute location
+   * which can be found on disk.
+   *
+   * Note, fake paddrs should work like the absolute ones.
+   */
   bool is_absolute() const {
+#ifdef UNIT_TESTS_BUILT
+    return get_addr_type() != paddr_types_t::RESERVED ||
+           is_fake();
+#else
     return get_addr_type() != paddr_types_t::RESERVED;
+#endif
   }
 
   bool is_absolute_random_block() const {