This ensures that locks get kicked after recovery. Otherwise we may have
a client who ends up with the caps they had before, waiting for the MDS to
issue say RD and no progress being made.
-
bool Locker::issue_caps(CInode *in, Capability *only_cap)
{
// allowed caps are determined by the lock mode.
}
}
in->auth_unpin(this);
+
+ mds->locker->issue_caps(in);
}
}
}
}
+void MDCache::reissue_all_caps()
+{
+ dout(10) << "reissue_all_caps" << dendl;
+
+ for (hash_map<vinodeno_t,CInode*>::iterator p = inode_map.begin();
+ p != inode_map.end();
+ ++p) {
+ CInode *in = p->second;
+ if (in->is_any_caps())
+ mds->locker->issue_caps(in);
+ }
+}
+
// ===============================================================================
void do_delayed_cap_imports();
void open_snap_parents();
-
+ void reissue_all_caps();
friend class Locker;
mdcache->start_recovered_truncates();
mdcache->do_file_recover();
+
+ mdcache->reissue_all_caps();
// tell connected clients
bcast_mds_map();