File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 55
66#include < seastar/core/future.hh>
77#include < seastar/core/circular_buffer.hh>
8+
9+ #include " common/hobject.h"
810#include " crimson/common/log.h"
911
1012class read_lock {
@@ -45,9 +47,9 @@ class tri_mutex : private read_lock,
4547public:
4648 tri_mutex () = default ;
4749#ifdef NDEBUG
48- tri_mutex (const std::string obj_name) : name() {}
50+ tri_mutex (const hobject_t & obj_name) : name() {}
4951#else
50- tri_mutex (const std::string obj_name) : name(obj_name) {}
52+ tri_mutex (const hobject_t & obj_name) : name(obj_name) {}
5153#endif
5254 ~tri_mutex ();
5355
@@ -99,7 +101,7 @@ class tri_mutex : private read_lock,
99101 }
100102 }
101103
102- std::string_view get_name () const {
104+ const hobject_t & get_name () const {
103105 return name;
104106 }
105107
@@ -122,7 +124,7 @@ class tri_mutex : private read_lock,
122124 type_t type;
123125 };
124126 seastar::circular_buffer<waiter_t > waiters;
125- const std::string name;
127+ const hobject_t name;
126128 friend class read_lock ;
127129 friend class write_lock ;
128130 friend class excl_lock ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class ObjectContext : public ceph::common::intrusive_lru_base<
7373 using watch_key_t = std::pair<uint64_t , entity_name_t >;
7474 std::map<watch_key_t , seastar::shared_ptr<crimson::osd::Watch>> watchers;
7575
76- ObjectContext (hobject_t hoid) : lock(hoid.oid.name ),
76+ ObjectContext (hobject_t hoid) : lock(hoid),
7777 obs (std::move(hoid)) {}
7878
7979 const hobject_t &get_oid () const {
You can’t perform that action at this time.
0 commit comments