]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: don't build unnecessary parts of SnapMapper for crimson
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 16 Nov 2022 16:47:49 +0000 (16:47 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 28 Feb 2023 16:22:04 +0000 (16:22 +0000)
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 <rzarzyns@redhat.com>
src/osd/SnapMapper.cc
src/osd/SnapMapper.h

index 076f6fc8e71cadd812079754523663b9e4055621..8665eaa4429ef0a21c258614df4c1355e0619997 100644 (file)
@@ -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
index 01879c6e15b841d30528b82c42d0875cc70fe42c..62bdd083cc015b1943966e74b9618d293c50a69b 100644 (file)
@@ -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,