]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
* fixed bug with multiple mds restarts (log ambiguous import success/failure)
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 25 May 2007 20:45:06 +0000 (20:45 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 25 May 2007 20:45:06 +0000 (20:45 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1379 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/cephmds2/TODO
branches/sage/cephmds2/mds/Locker.cc
branches/sage/cephmds2/mds/MDCache.cc
branches/sage/cephmds2/mds/SimpleLock.h
branches/sage/cephmds2/mds/events/EExport.h
branches/sage/cephmds2/mds/events/EImportFinish.h

index e7717687cf222151daa8fbe3131f56614174817e..72bb37d21098deb8261f8a65ee2458b601ddf302 100644 (file)
@@ -15,22 +15,6 @@ doc
 mds
 - finish multistage rejoin 
 
-- no lock messaging with down|recovering node..
- - SimpleLock
-   - replica -> auth : 
-   - auth -> replica : skip before rejoin, we can lock (or unlock/sync) with impunity
- - ScatterLock
-   - replica -> auth : 
-   - auth -> replica :
- - FileLock
-   - replica -> auth : 
-   - auth -> replica :
-???
-
- - failure safe (above)
- - export safe (ambiguous auth...)
-
-
 - trim_on_rejoin
 
 - more testing of failures + thrashing.
index c9cfb2e6b964012f5806595e4fd7e9c3a9fe7d11..03d7ded0d09d9fbaa3feb40a4890692dad0411cc 100644 (file)
@@ -949,7 +949,7 @@ void Locker::simple_eval(SimpleLock *lock)
     }
     
     lock->set_state(LOCK_LOCK);
-    lock->finish_waiters(SimpleLock::WAIT_STABLE);
+    lock->finish_waiters(SimpleLock::WAIT_STABLE|SimpleLock::WAIT_WR);
   }
 
   // stable -> sync?
index 838ff5c1add1d85a03aee810e084f4073c09a396..774028cc457b1bf02425f0be6a386f1eab553354 100644 (file)
@@ -41,6 +41,7 @@
 #include "events/ESlaveUpdate.h"
 #include "events/EString.h"
 #include "events/EPurgeFinish.h"
+#include "events/EImportFinish.h"
 
 #include "messages/MGenericMessage.h"
 
@@ -1199,9 +1200,11 @@ void MDCache::disambiguate_imports()
     if (dir->authority().first != CDIR_AUTH_UNKNOWN) {
       dout(10) << "ambiguous import auth known, must not be me " << *dir << endl;
       cancel_ambiguous_import(q->first);
+      mds->mdlog->submit_entry(new EImportFinish(dir, false));
     } else {
       dout(10) << "ambiguous import auth unknown, must be me " << *dir << endl;
       finish_ambiguous_import(q->first);
+      mds->mdlog->submit_entry(new EImportFinish(dir, true));
     }
   }
   assert(my_ambiguous_imports.empty());
index 163e84f7a17f07ab2032049ecbf60cc4ec15e65a..bf7b67123632900a8b3b78a7eef5d059f997c5f9 100644 (file)
 
 inline const char *get_lock_type_name(int t) {
   switch (t) {
-  case LOCK_OTYPE_DN: return "dentry";
-  case LOCK_OTYPE_IFILE: return "inode_file";
-  case LOCK_OTYPE_IAUTH: return "inode_auth";
-  case LOCK_OTYPE_ILINK: return "inode_link";
-  case LOCK_OTYPE_IDIRFRAGTREE: return "inode_dirfragtree";
-  case LOCK_OTYPE_IDIR: return "inode_dir";
+  case LOCK_OTYPE_DN: return "dn";
+  case LOCK_OTYPE_IFILE: return "ifile";
+  case LOCK_OTYPE_IAUTH: return "iauth";
+  case LOCK_OTYPE_ILINK: return "ilink";
+  case LOCK_OTYPE_IDIRFRAGTREE: return "idft";
+  case LOCK_OTYPE_IDIR: return "idir";
   default: assert(0);
   }
 }
index eaa6d8e4bcce7e3ad1c1a1093231a9318fbe345d..98c68ec78dd1edf5260b54299965bc3d7a6c9597 100644 (file)
@@ -39,7 +39,7 @@ public:
   set<dirfrag_t> &get_bounds() { return bounds; }
   
   void print(ostream& out) {
-    out << "export " << base << " " << metablob;
+    out << "EExport " << base << " " << metablob;
   }
 
   virtual void encode_payload(bufferlist& bl) {
index 7d51c038f3fab2d5c5a6054c6e49e90f4de54d7a..59a3a564571ca23912691761b3a22a921fef06a1 100644 (file)
@@ -32,7 +32,7 @@ class EImportFinish : public LogEvent {
   EImportFinish() : LogEvent(EVENT_IMPORTFINISH) { }
   
   void print(ostream& out) {
-    out << "import_finish " << base;
+    out << "EImportFinish " << base;
     if (success)
       out << " success";
     else