If we journal opened non-auth inode, during journal replay, the corresponding
entry will add non-auth objects to the cache. But the MDS does not journal all
subsequent modifications (rmdir,rename) to these non-auth objects, so the code
that manages cache and subtree may get confused. Besides non-auth objects will
be trimmed at the resolve stage.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
}
CInode *cur = cap->get_inode();
+ if (!cur->is_auth())
+ return;
if (cap->wanted() == 0) {
if (cur->item_open_file.is_on_list() &&
!cur->is_any_caps_wanted()) {
in->clear_dirty_rstat();
+ in->item_open_file.remove_myself();
+
// waiters
in->take_waiting(CInode::WAIT_ANY_MASK, finished);
mds->locker->check_inode_max_size(cur);
// make sure this inode gets into the journal
- if (!cur->item_open_file.is_on_list() && cur->last == CEPH_NOSNAP) {
+ if (cur->is_auth() && cur->last == CEPH_NOSNAP &&
+ !cur->item_open_file.is_on_list()) {
LogSegment *ls = mds->mdlog->get_current_segment();
EOpen *le = new EOpen(mds->mdlog);
mdlog->start_entry(le);
CInode *in = *p;
assert(in->last == CEPH_NOSNAP);
++p;
- if (in->is_any_caps()) {
+ if (in->is_auth() && in->is_any_caps()) {
if (in->is_any_caps_wanted()) {
dout(20) << "try_to_expire requeueing open file " << *in << dendl;
if (!le) {