}
void CDentry::mark_clean() {
dout(10) << " mark_clean " << *this << endl;
+ assert(dirty);
assert(parent_dir_version <= dir->get_version());
+
+ if (parent_dir_version < dir->get_last_committed_version())
+ cerr << " bad mark_clean " << *this << endl;
+
assert(parent_dir_version >= dir->get_last_committed_version());
if (is_primary() && dirty && inode) inode->put(CINODE_PIN_DNDIRTY);
if (!dir->is_auth()) {
int newauth = dir->authority();
dout(7) << "proxy dir expire on " << *dir << " to " << newauth << endl;
+ if (!dir->is_proxy())
+ dout(0) << "nonproxy dir expire? " << *dir << " .. auth is " << newauth << " .. expire is from " << from << endl;
assert(dir->is_proxy());
assert(newauth >= 0);
assert(dir->state_test(CDIR_STATE_PROXY));
it++) {
CInode *in = get_inode(*it);
in->put(CINODE_PIN_PROXY);
+ assert(in->state_test(CINODE_STATE_PROXY));
in->state_clear(CINODE_STATE_PROXY);
}
export_proxy_inos.erase(dir);
it++) {
CDir *dir = get_inode(*it)->dir;
dir->put(CDIR_PIN_PROXY);
+ assert(dir->state_test(CDIR_STATE_PROXY));
dir->state_clear(CDIR_STATE_PROXY);
// hose neg dentries, too, since we're no longer auth
assert(dn->is_sync());
dir->remove_dentry(dn);
} else {
- dout(10) << "export_dir_notify_ack leaving xlocked neg " << *dn << endl;
- dn->mark_clean();
+ //dout(10) << "export_dir_notify_ack leaving xlocked neg " << *dn << endl;
+ if (dn->is_dirty())
+ dn->mark_clean();
}
}
}
it != hash_proxy_inos[dir].end();
it++) {
CInode *in = *it;
+ assert(in->state_test(CINODE_STATE_PROXY));
in->state_clear(CINODE_STATE_PROXY);
in->put(CINODE_PIN_PROXY);
}
it != hash_proxy_inos[dir].end();
it++) {
CInode *in = *it;
+ assert(in->state_test(CINODE_STATE_PROXY));
in->state_clear(CINODE_STATE_PROXY);
in->put(CINODE_PIN_PROXY);
}
}
else if (dn->get_parent_dir_version() == committed_version) {
dout(15) << " dir " << committed_version << " == dn " << dn->get_parent_dir_version() << " now clean " << *dn << endl;
- dn->mark_clean(); // might not but could be dirty
+ if (dn->is_dirty())
+ dn->mark_clean(); // might not but could be dirty
// remove, if it's null and unlocked
if (dn->is_null() && dn->is_sync()) {