Because we can do an inode import during a rename that skips the usual
channels, we were getting into an odd state with the xlocks (which we
did as a slave for an inode that we exported away). Clean up the
record of these xlocks for inodes before we get into the request
cleanup (at which point we are labeled as no-longer-auth, and the
standard cleanup routines will break).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
}
// drop our pins
+ if (srcdn->is_auth()) {
+ // we exported, clear out any xlocks that we moved to another MDS
+ set<SimpleLock*>::iterator i = mdr->xlocks.begin();
+ while(i != mdr->xlocks.end()) {
+ SimpleLock *lock = *i;
+ lock->put_xlock();
+ mdr->xlocks.erase(i++);
+ mdr->locks.erase(lock);
+ }
+ }
mdr->cleanup();
mdlog->submit_entry(le, new C_MDS_CommittedSlave(this, mdr));