dout(10) << " must authpin " << *object << dendl;
- if (mdr->is_auth_pinned(object))
- continue;
+ if (mdr->is_auth_pinned(object)) {
+ if (object != (MDSCacheObject*)auth_pin_freeze)
+ continue;
+ if (mdr->more()->is_remote_frozen_authpin) {
+ if (mdr->more()->rename_inode == auth_pin_freeze)
+ continue;
+ // unfreeze auth pin for the wrong inode
+ mustpin_remote[mdr->more()->rename_inode->authority().first].size();
+ }
+ }
if (!object->is_auth()) {
if (!mdr->locks.empty())
MDSCacheObjectInfo info;
(*p)->set_object_info(info);
reply->get_authpins().push_back(info);
+ if (*p == (MDSCacheObject*)auth_pin_freeze)
+ auth_pin_freeze->set_object_info(reply->get_authpin_freeze());
}
- if (auth_pin_freeze)
- auth_pin_freeze->set_object_info(reply->get_authpin_freeze());
-
if (wouldblock)
reply->mark_error_wouldblock();
if (readonly)
pinned.insert(object);
}
+ // removed frozen auth pin ?
+ if (mdr->more()->is_remote_frozen_authpin &&
+ ack->get_authpin_freeze() == MDSCacheObjectInfo()) {
+ auto p = mdr->remote_auth_pins.find(mdr->more()->rename_inode);
+ assert(p != mdr->remote_auth_pins.end());
+ if (p->second == from) {
+ mdr->more()->is_remote_frozen_authpin = false;
+ }
+ }
+
// removed auth pins?
map<MDSCacheObject*, mds_rank_t>::iterator p = mdr->remote_auth_pins.begin();
while (p != mdr->remote_auth_pins.end()) {