MCPcopy Create free account
hub / github.com/ceph/ceph / put

Function put

src/mds/MDSCacheObject.h:138–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 }
137 virtual void _put() {}
138 void put(int by) {
139#ifdef MDS_REF_SET
140 if (ref == 0 || ref_map[by] == 0) {
141#else
142 if (ref == 0) {
143#endif
144 bad_put(by);
145 } else {
146 ref--;
147#ifdef MDS_REF_SET
148 ref_map[by]--;
149#endif
150 if (ref == 0)
151 last_put();
152 if (state_test(STATE_NOTIFYREF))
153 _put();
154 }
155 }
156
157 virtual void first_get() {}
158 virtual void bad_get(int by) {
159#ifdef MDS_REF_SET
160 ceph_assert(by < 0 || ref_map[by] == 0);
161#endif
162 ceph_abort();
163 }
164 void get(int by) {
165 if (ref == 0)
166 first_get();
167 ref++;
168#ifdef MDS_REF_SET
169 if (ref_map.find(by) == ref_map.end())
170 ref_map[by] = 0;
171 ref_map[by]++;
172#endif
173 }
174
175 void print_pin_set(std::ostream& out) const {
176#ifdef MDS_REF_SET
177 for(auto const &p : ref_map) {
178 out << " " << pin_name(p.first) << "=" << p.second;
179 }
180#else
181 out << " nref=" << ref;
182#endif
183 }
184
185 int get_num_auth_pins() const { return auth_pins; }
186#ifdef MDS_AUTHPIN_SET
187 void print_authpin_set(std::ostream& out) const {
188 out << " (" << auth_pin_set << ")";
189 }
190#endif
191
192 void dump_states(ceph::Formatter *f) const;
193 void dump(ceph::Formatter *f) const;
194
195 // auth pins

Callers 15

finish_exportMethod · 0.70
abort_exportMethod · 0.70
remove_replicaFunction · 0.70
clear_replica_mapFunction · 0.70
remove_need_snapflushMethod · 0.70
clear_dirty_rstatMethod · 0.70
put_stickydirsMethod · 0.70
remove_remote_parentMethod · 0.70
mark_cleanMethod · 0.70
clear_dirty_parentMethod · 0.70
take_dir_waitingMethod · 0.70
take_waitingMethod · 0.70

Calls 4

bad_putFunction · 0.85
last_putFunction · 0.85
state_testFunction · 0.85
_putFunction · 0.85

Tested by 2

expect_image_syncMethod · 0.40
putMethod · 0.40