Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
void Locker::put_lock_cache(MDLockCache* lock_cache)
{
+ dout(20) << __func__ << ": " << *lock_cache << dendl;
+
ceph_assert(lock_cache->ref > 0);
if (--lock_cache->ref > 0)
return;
void Locker::invalidate_lock_cache(MDLockCache *lock_cache)
{
+ dout(15) << __func__ << ": " << *lock_cache << dendl;
+
ceph_assert(lock_cache->item_cap_lock_cache.is_on_list());
if (lock_cache->invalidating) {
ceph_assert(!lock_cache->client_cap);
}
items_dir.reset();
}
+
+void MDLockCache::print(std::ostream& out) const {
+ out << "MDLockCache(o=" << ceph_mds_op_name(opcode)
+ << " diri=" << diri->ino();
+ if (client_cap) {
+ out << " c=" << client_cap->get_client();
+ } else {
+ out << " c=(nil)";
+ }
+ out << " r=" << ref;
+ if (invalidating) {
+ out << " invalidating";
+ }
+ out << ")";
+}
return dir_layout;
}
+ void print(std::ostream& out) const;
void attach_locks();
void attach_dirfrags(std::vector<CDir*>&& dfv);
void detach_locks();