]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: propagation basically behaving
authorSage Weil <sage@newdream.net>
Tue, 3 Jun 2008 19:04:33 +0000 (12:04 -0700)
committerSage Weil <sage@newdream.net>
Tue, 3 Jun 2008 19:04:33 +0000 (12:04 -0700)
src/TODO
src/mds/Locker.cc

index b18cdabd05a2fc6e947e50e7821dc5a07e3c87d0..c5e59bca86c29423cc853824697519a3f6147ce0 100644 (file)
--- 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
index a2f0925d705c175cbee6ef605c6bdf460af04587..83c8a5393450955d18441184518df7645156afc6 100644 (file)
@@ -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();