From: Yingxin Cheng Date: Wed, 23 Apr 2025 09:27:04 +0000 (+0800) Subject: crimson/os/seastore/seastore_types: tolerate fake paddrs as absolute addresses X-Git-Tag: v20.3.0~6^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59907c3532520fd0e2bf3922e1cf4ae16ac7dd56;p=ceph-ci.git crimson/os/seastore/seastore_types: tolerate fake paddrs as absolute addresses Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index f797321e1fb..1d9cfc39563 100644 --- a/src/crimson/os/seastore/seastore_types.h +++ b/src/crimson/os/seastore/seastore_types.h @@ -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 {