Merge branch 'testing' into unstable

This commit is contained in:
Sage Weil 2011-01-03 15:15:26 -08:00
commit aad9ffec26
4 changed files with 27 additions and 13 deletions

View File

@ -7400,17 +7400,27 @@ void MDCache::purge_stray(CDentry *dn)
assert(in->last == CEPH_NOSNAP);
}
uint64_t period = in->inode.layout.fl_object_size * in->inode.layout.fl_stripe_count;
uint64_t cur_max_size = in->inode.get_max_size();
uint64_t to = MAX(in->inode.size, cur_max_size);
uint64_t num = (to + period - 1) / period;
dout(10) << "purge_stray 0~" << to << " objects 0~" << num << " snapc " << snapc << " on " << *in << dendl;
if (to)
mds->filer->purge_range(in->inode.ino, &in->inode.layout, *snapc,
0, num, g_clock.now(), 0,
new C_MDC_PurgeStrayPurged(this, dn));
else
if (in->is_dir()) {
dout(10) << "purge_stray dir ... implement me!" << dendl; // FIXME XXX
_purge_stray_purged(dn);
} else if (in->is_file()) {
uint64_t period = in->inode.layout.fl_object_size * in->inode.layout.fl_stripe_count;
uint64_t cur_max_size = in->inode.get_max_size();
uint64_t to = MAX(in->inode.size, cur_max_size);
if (to && period) {
uint64_t num = (to + period - 1) / period;
dout(10) << "purge_stray 0~" << to << " objects 0~" << num << " snapc " << snapc << " on " << *in << dendl;
mds->filer->purge_range(in->inode.ino, &in->inode.layout, *snapc,
0, num, g_clock.now(), 0,
new C_MDC_PurgeStrayPurged(this, dn));
} else {
dout(10) << "purge_stray 0 objects snapc " << snapc << " on " << *in << dendl;
_purge_stray_purged(dn);
}
} else {
// not a dir or file; purged!
_purge_stray_purged(dn);
}
}
class C_MDC_PurgeStrayLogged : public Context {

View File

@ -1108,7 +1108,8 @@ void MDS::boot_start(int step, int r)
break;
case 2:
if (is_starting()) {
if (is_starting() ||
whoami == mdsmap->get_root()) { // load root inode off disk if we are auth
dout(2) << "boot_start " << step << ": loading/discovering root inode" << dendl;
mdcache->open_root_inode(new C_MDS_BootStart(this, 3));
break;

View File

@ -550,8 +550,10 @@ void SimpleMessenger::Pipe::queue_received(Message *m, int priority)
messenger->dispatch_queue.lock.Lock();
pipe_lock.Lock();
if (halt_delivery)
if (halt_delivery) {
messenger->dispatch_queue.lock.Unlock();
goto halt;
}
dout(20) << "queue_received queuing pipe" << dendl;
if (!queue_items.count(priority))

View File

@ -106,7 +106,7 @@ uint64_t JournalingObjectStore::_op_apply_start(uint64_t op)
Cond cond;
ops_apply_blocked.push_back(&cond);
dout(10) << "op_apply_start " << op << " blocked (getting in back of line)" << dendl;
while (blocked)
while (blocked && ops_apply_blocked.front() != &cond)
cond.Wait(journal_lock);
dout(10) << "op_apply_start " << op << " woke (at front of line)" << dendl;
ops_apply_blocked.pop_front();
@ -154,6 +154,7 @@ void JournalingObjectStore::op_submit_finish(uint64_t op)
if (op != ops_submitting.front()) {
dout(0) << "op_submit_finish " << op << " expected " << ops_submitting.front()
<< ", OUT OF ORDER" << dendl;
assert(0 == "out of order op_submit_finish");
}
ops_submitting.pop_front();
journal_lock.Unlock();