From: Kefu Chai Date: Tue, 29 Jun 2021 04:01:20 +0000 (+0800) Subject: crimson/os/alienstore: return attrs retrieved from bluestore directly X-Git-Tag: v17.1.0~1518^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42054%2Fhead;p=ceph.git crimson/os/alienstore: return attrs retrieved from bluestore directly since ObjectStore returns a map<...,less<>> already, there is not point to convert the returned map to the type expected by AlienStore. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/os/alienstore/alien_store.cc b/src/crimson/os/alienstore/alien_store.cc index aa9758147df0..091e438466c5 100644 --- a/src/crimson/os/alienstore/alien_store.cc +++ b/src/crimson/os/alienstore/alien_store.cc @@ -338,13 +338,7 @@ AlienStore::get_attrs(CollectionRef ch, return seastar::do_with(attrs_t{}, [=] (auto &aset) { return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &aset] { auto c = static_cast(ch.get()); - std::map blueaset; - const auto r = store->getattrs(c->collection, oid, blueaset); - for (auto& [bluekey, blueval] : blueaset) { - ceph::bufferlist bl; - bl.push_back(std::move(blueval)); - aset.emplace(std::move(bluekey), std::move(bl)); - } + const auto r = store->getattrs(c->collection, oid, aset); return r; }).then([&aset] (int r) -> get_attrs_ertr::future { if (r == -ENOENT) { diff --git a/src/crimson/osd/replicated_recovery_backend.cc b/src/crimson/osd/replicated_recovery_backend.cc index 79e39c6fed3e..927551d07681 100644 --- a/src/crimson/osd/replicated_recovery_backend.cc +++ b/src/crimson/osd/replicated_recovery_backend.cc @@ -927,7 +927,7 @@ ReplicatedRecoveryBackend::prep_push_target( bool complete, bool clear_omap, ObjectStore::Transaction* t, - const map& attrs, + const map>& attrs, bufferlist&& omap_header) { if (!first) { @@ -1003,7 +1003,7 @@ ReplicatedRecoveryBackend::submit_push_data( interval_set&& intervals_included, bufferlist&& data_included, bufferlist&& omap_header, - const map &attrs, + const map> &attrs, map&& omap_entries, ObjectStore::Transaction *t) { diff --git a/src/crimson/osd/replicated_recovery_backend.h b/src/crimson/osd/replicated_recovery_backend.h index 55cd0f17861b..1d9b6042b9b1 100644 --- a/src/crimson/osd/replicated_recovery_backend.h +++ b/src/crimson/osd/replicated_recovery_backend.h @@ -82,7 +82,7 @@ protected: interval_set&& intervals_included, ceph::bufferlist&& data_included, ceph::bufferlist&& omap_header, - const std::map &attrs, + const std::map> &attrs, std::map&& omap_entries, ceph::os::Transaction *t); void submit_push_complete( @@ -161,7 +161,7 @@ private: bool complete, bool clear_omap, ObjectStore::Transaction* t, - const map &attrs, + const std::map> &attrs, bufferlist&& omap_header); using interruptor = crimson::interruptible::interruptor< crimson::osd::IOInterruptCondition>;