From 2a827f5e0e1d23792e1b3f1766b03297260b9644 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 12 Aug 2019 20:28:37 +0200 Subject: [PATCH] crimson/os, crimson/osd: make xattr retrieval const. Signed-off-by: Radoslaw Zarzynski --- src/crimson/os/cyan_store.cc | 2 +- src/crimson/os/cyan_store.h | 2 +- src/crimson/os/futurized_store.h | 2 +- src/crimson/osd/pg_backend.cc | 4 ++-- src/crimson/osd/pg_backend.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crimson/os/cyan_store.cc b/src/crimson/os/cyan_store.cc index 6fa66e18f35..3bd953dc356 100644 --- a/src/crimson/os/cyan_store.cc +++ b/src/crimson/os/cyan_store.cc @@ -201,7 +201,7 @@ seastar::future CyanStore::read(CollectionRef c, seastar::future CyanStore::get_attr(CollectionRef c, const ghobject_t& oid, - std::string_view name) + std::string_view name) const { logger().debug("{} {} {}", __func__, c->cid, oid); diff --git a/src/crimson/os/cyan_store.h b/src/crimson/os/cyan_store.h index 810e54bf6aa..0ab215fb00f 100644 --- a/src/crimson/os/cyan_store.h +++ b/src/crimson/os/cyan_store.h @@ -51,7 +51,7 @@ public: uint32_t op_flags = 0) final; seastar::future get_attr(CollectionRef c, const ghobject_t& oid, - std::string_view name) final; + std::string_view name) const final; seastar::future get_attrs(CollectionRef c, const ghobject_t& oid) final; diff --git a/src/crimson/os/futurized_store.h b/src/crimson/os/futurized_store.h index ac8a6fc2d55..ebbe53a4cef 100644 --- a/src/crimson/os/futurized_store.h +++ b/src/crimson/os/futurized_store.h @@ -72,7 +72,7 @@ public: uint32_t op_flags = 0) = 0; virtual seastar::future get_attr(CollectionRef c, const ghobject_t& oid, - std::string_view name) = 0; + std::string_view name) const = 0; using attrs_t = std::map>; virtual seastar::future get_attrs(CollectionRef c, diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index 41e05932d86..9fe24d4e63c 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -428,7 +428,7 @@ seastar::future<> PGBackend::setxattr( seastar::future<> PGBackend::getxattr( const ObjectState& os, - OSDOp& osd_op) + OSDOp& osd_op) const { std::string name; ceph::bufferlist val; @@ -452,7 +452,7 @@ seastar::future<> PGBackend::getxattr( seastar::future PGBackend::getxattr( const hobject_t& soid, - std::string_view key) + std::string_view key) const { return store->get_attr(coll, ghobject_t{soid}, key); } diff --git a/src/crimson/osd/pg_backend.h b/src/crimson/osd/pg_backend.h index 0c85dfe266e..7f3dd4fb3a9 100644 --- a/src/crimson/osd/pg_backend.h +++ b/src/crimson/osd/pg_backend.h @@ -78,10 +78,10 @@ public: ceph::os::Transaction& trans); seastar::future<> getxattr( const ObjectState& os, - OSDOp& osd_op); + OSDOp& osd_op) const; seastar::future getxattr( const hobject_t& soid, - std::string_view key); + std::string_view key) const; virtual void got_rep_op_reply(const MOSDRepOpReply&) {} -- 2.39.5