- fix rejoin vs updated dirfrag nested/dirlocks
mds mustfix
+
+- make sure locker avoids frozen inodes
+- make sure predirty_nested stops if it can't wrlock versionlock (acquire_locks normally hides that detail for us)
+
+- look at the client_map session opening code.. versus rollback (of import, or slave request)
+
- rollback vs accounting is just broken! can we avoid it.
- even with _just_ parent dir mtime, the rollback metablob isn't sufficient during replay.. we need special handling regardless.
}
// test hack: bail after slave does prepare, so we can verify it's _live_ rollback.
- if (!mdr->more()->slaves.empty() && !srci->is_dir()) assert(0);
+ //if (!mdr->more()->slaves.empty() && !srci->is_dir()) assert(0);
//if (!mdr->more()->slaves.empty() && srci->is_dir()) assert(0);
// -- prepare anchor updates --
destdn->inode->state_set(CInode::STATE_AUTH);
}
- if (destdn->inode->is_auth())
+ if (destdn->is_auth())
destdn->inode->pop_and_dirty_projected_inode(mdr->ls);
}
bufferlist inodebl;
mdcache->migrator->encode_export_inode(srcdn->inode, inodebl,
exported_client_map);
- mdcache->migrator->finish_export_inode(srcdn->inode, mdr->now, finished);
- mds->queue_waiters(finished); // this includes SINGLEAUTH waiters.
::encode(exported_client_map, reply->inode_export);
reply->inode_export.claim_append(inodebl);
reply->inode_export_v = srcdn->inode->inode.version;
// hmm, do i really need to delay this?
if (srcdn->is_auth() && destdn->is_primary() &&
destdn->inode->state_test(CInode::STATE_AMBIGUOUSAUTH)) {
- dout(10) << " unfreezing exported inode " << *destdn->inode << dendl;
list<Context*> finished;
-
+
+ dout(10) << " finishing inode export on " << *destdn->inode << dendl;
+ mdcache->migrator->finish_export_inode(destdn->inode, mdr->now, finished);
+ mds->queue_waiters(finished); // this includes SINGLEAUTH waiters.
+
// singleauth
assert(destdn->inode->state_test(CInode::STATE_AMBIGUOUSAUTH));
destdn->inode->state_clear(CInode::STATE_AMBIGUOUSAUTH);
} else {
if (srcdn->is_auth() && destdn->is_primary() &&
destdn->inode->state_test(CInode::STATE_AMBIGUOUSAUTH)) {
+ list<Context*> finished;
+
dout(10) << " reversing inode export of " << *destdn->inode << dendl;
- assert(0); // this bites
+ destdn->inode->abort_export();
+
+ // singleauth
+ assert(destdn->inode->state_test(CInode::STATE_AMBIGUOUSAUTH));
+ destdn->inode->state_clear(CInode::STATE_AMBIGUOUSAUTH);
+ destdn->inode->take_waiting(CInode::WAIT_SINGLEAUTH, finished);
+
+ // unfreeze
+ assert(destdn->inode->is_frozen_inode() ||
+ destdn->inode->is_freezing_inode());
+ destdn->inode->unfreeze_inode(finished);
+
+ mds->queue_waiters(finished);
}
// abort