From 3d48489f4b6a46536e89031f886ce7c4605c58db Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 16 Nov 2022 16:47:49 +0000 Subject: [PATCH] osd: don't build unnecessary parts of SnapMapper for crimson This commits skips building two call-sites of `omap_get_iterator()` of `ObjectStore` which are bypassing the `OSDriver` abstraction layer. 1. `SnapMapper::convert_legacy()` likely never be needed by crimson and we can leave it unchanged. 2. `SnapMapper::Subber` isn't needed right now but will be needed in the future. Signed-off-by: Radoslaw Zarzynski --- src/osd/SnapMapper.cc | 4 ++++ src/osd/SnapMapper.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 076f6fc8e71..8665eaa4429 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -657,6 +657,7 @@ void SnapMapper::record_purged_snaps( } +#ifndef WITH_SEASTAR bool SnapMapper::Scrubber::_parse_p() { if (!psit->valid()) { @@ -760,6 +761,7 @@ void SnapMapper::Scrubber::run() psit = ObjectMap::ObjectMapIterator(); mapit = ObjectMap::ObjectMapIterator(); } +#endif // !WITH_SEASTAR // ------------------------------------- @@ -816,6 +818,7 @@ std::string SnapMapper::convert_legacy_key( + "_" + object_suffix; } +#ifndef WITH_SEASTAR int SnapMapper::convert_legacy( CephContext *cct, ObjectStore *store, @@ -874,3 +877,4 @@ int SnapMapper::convert_legacy( } return 0; } +#endif // !WITH_SEASTAR diff --git a/src/osd/SnapMapper.h b/src/osd/SnapMapper.h index 01879c6e15b..62bdd083cc0 100644 --- a/src/osd/SnapMapper.h +++ b/src/osd/SnapMapper.h @@ -141,6 +141,7 @@ public: static const char *PURGED_SNAP_EPOCH_PREFIX; static const char *PURGED_SNAP_PREFIX; +#ifndef WITH_SEASTAR struct Scrubber { CephContext *cct; ObjectStore *store; @@ -187,6 +188,7 @@ public: ObjectStore::CollectionHandle& ch, ghobject_t hoid, unsigned max); +#endif static void record_purged_snaps( CephContext *cct,