@@ -1166,6 +1166,10 @@ static PG::interruptible_future<hobject_t> pgls_filter(
11661166 }
11671167}
11681168
1169+ static inline bool is_snapmapper_oid (const hobject_t &obj) {
1170+ return obj.oid .name == SNAPMAPPER_OID;
1171+ }
1172+
11691173static PG::interruptible_future<ceph::bufferlist> do_pgnls_common (
11701174 const hobject_t & pg_start,
11711175 const hobject_t & pg_end,
@@ -1186,6 +1190,13 @@ static PG::interruptible_future<ceph::bufferlist> do_pgnls_common(
11861190 [&backend, filter, nspace](auto && ret)
11871191 -> PG::interruptible_future<std::tuple<std::vector<hobject_t >, hobject_t >> {
11881192 auto & [objects, next] = ret;
1193+ auto is_snapmapper = [](const hobject_t &obj) {
1194+ if (is_snapmapper_oid (obj)) {
1195+ return false ;
1196+ } else {
1197+ return true ;
1198+ }
1199+ };
11891200 auto in_my_namespace = [&nspace](const hobject_t & obj) {
11901201 using crimson::common::local_conf;
11911202 if (obj.get_namespace () == local_conf ()->osd_hit_set_namespace ) {
@@ -1213,7 +1224,8 @@ static PG::interruptible_future<ceph::bufferlist> do_pgnls_common(
12131224 }
12141225 };
12151226
1216- auto range = objects | boost::adaptors::filtered (in_my_namespace)
1227+ auto range = objects | boost::adaptors::filtered (is_snapmapper)
1228+ | boost::adaptors::filtered (in_my_namespace)
12171229 | boost::adaptors::transformed (to_pglsed);
12181230 logger ().debug (" do_pgnls_common: finishing the 1st stage of pgls" );
12191231 return seastar::when_all_succeed (std::begin (range),
@@ -1346,6 +1358,9 @@ static PG::interruptible_future<ceph::bufferlist> do_pgls_common(
13461358 PG::interruptor::map_reduce (std::move (objects),
13471359 [&backend, filter, nspace](const hobject_t & obj)
13481360 -> PG::interruptible_future<hobject_t >{
1361+ if (is_snapmapper_oid (obj)) {
1362+ return seastar::make_ready_future<hobject_t >();
1363+ }
13491364 if (obj.get_namespace () == nspace) {
13501365 if (filter) {
13511366 return pgls_filter (*filter, backend, obj);
0 commit comments