From: Sage Weil Date: Tue, 3 Jun 2008 19:04:33 +0000 (-0700) Subject: mds: propagation basically behaving X-Git-Tag: v0.3~170^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af16e96611c01f298943609a8e9bcadc64ae345d;p=ceph.git mds: propagation basically behaving --- diff --git a/src/TODO b/src/TODO index b18cdabd05a2..c5e59bca86c2 100644 --- a/src/TODO +++ b/src/TODO @@ -71,17 +71,14 @@ mds mustfix /- make sure predirty_nested stops if it can't wrlock versionlock (acquire_locks normally hides that detail for us) - make sure stray inode is always opened on startup /- make sure inode cache expire for frozen inode behaves +- REQSCATTER/REQUNSCATTER ... can we avoid the auth pin requirement? - 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. - - anchor_destroy needs to xlock linklock.. which means it needs a Mutation wrapper? - ... when it gets a caller.. someday.. - replay of dir fragmentation (dont want dir frozen, pins, etc.?) -- rename slave in-memory rollback on failure - proper handling of cache expire messages during rejoin phase? -> i think cache expires are fine; the rejoin_ack handler just has to behave if rejoining items go missing diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index a2f0925d705c..83c8a5393450 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -490,9 +490,11 @@ void Locker::file_update_finish(CInode *in, Mutation *mut, bool share) in->pop_and_dirty_projected_inode(mut->ls); in->put(CInode::PIN_PTRWAITER); - mut->pop_and_dirty_projected_inodes(); - mut->pop_and_dirty_projected_fnodes(); + mut->apply(); drop_locks(mut); + mut->drop_local_auth_pins(); + + delete mut; if (share && in->is_auth() && in->filelock.is_stable()) share_inode_max_size(in); @@ -2396,12 +2398,19 @@ void Locker::scatter_nudge(ScatterLock *lock, Context *c) dout(10) << "scatter_nudge waiting for unfreeze on " << *p << dendl; if (c) p->add_waiter(MDSCacheObject::WAIT_UNFREEZE, c); + else + // just requeue. not ideal.. starvation prone.. + updated_scatterlocks.push_back(&lock->xlistitem_updated); return; } if (p->is_ambiguous_auth()) { dout(10) << "scatter_nudge waiting for single auth on " << *p << dendl; - p->add_waiter(MDSCacheObject::WAIT_SINGLEAUTH, c); + if (c) + p->add_waiter(MDSCacheObject::WAIT_SINGLEAUTH, c); + else + // just requeue. not ideal.. starvation prone.. + updated_scatterlocks.push_back(&lock->xlistitem_updated); return; } @@ -2441,8 +2450,11 @@ void Locker::scatter_tick() // updated utime_t now = g_clock.now(); + int n = updated_scatterlocks.size(); while (!updated_scatterlocks.empty()) { ScatterLock *lock = updated_scatterlocks.front(); + + if (n-- == 0) break; // scatter_nudge() may requeue; avoid looping if (!lock->is_updated()) { updated_scatterlocks.pop_front();