]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 2 Mar 2006 00:04:20 +0000 (00:04 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 2 Mar 2006 00:04:20 +0000 (00:04 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@716 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/client/Client.h
ceph/mds/MDCache.cc

index b8fd8cd71196fc62d20e57fda939f9ca317154fe..a7710447dc9be663a5830f7f83f08faaeeb12a1d 100644 (file)
@@ -213,7 +213,7 @@ class Inode {
   }
   int pick_replica(MDCluster *mdcluster) {
        // replicas?
-       if (dir_contacts.size()) {
+       if (ino() > 1ULL && dir_contacts.size()) {
          //cout << "dir_contacts if " << dir_contacts << endl;
          set<int>::iterator it = dir_contacts.begin();
          if (dir_contacts.size() == 1)
@@ -225,7 +225,7 @@ class Inode {
          }
        }
 
-       if (dir_replicated) {
+       if (dir_replicated || ino() == 1) {
          //cout << "num_mds is " << mdcluster->get_num_mds() << endl;
          return rand() % mdcluster->get_num_mds();  // huh.. pick a random mds!
        }
index 477aaad04daa42b6ed8817966a25916535c6bf67..5108f4e67edd619e019b041d9422be3ee41b362f 100644 (file)
@@ -441,6 +441,8 @@ void MDCache::export_empty_import(CDir *dir)
 {
   dout(7) << "export_empty_import " << *dir << endl;
   
+  return;  // hack fixme
+
   if (!dir->is_import()) {
        dout(7) << "not import (anymore?)" << endl;
        return;
@@ -471,7 +473,8 @@ void MDCache::export_empty_import(CDir *dir)
   dout(7) << "really empty, exporting to " << dest << endl;
   assert (dest != mds->get_nodeid());
   
-  dout(7) << "exporting empty import " << *dir << " to " << dest << endl;
+  dout(-7) << "exporting to mds" << dest 
+                  << " empty import " << *dir << endl;
   export_dir( dir, dest );
 }
 
@@ -541,7 +544,7 @@ bool MDCache::trim(int max) {
          diri->dir->state_clear(CDIR_STATE_COMPLETE);
 
          // reexport?
-         if (diri->dir->is_import() &&             // import
+         if (false && diri->dir->is_import() &&             // import
                  diri->dir->get_size() == 0 &&         // no children
                  !diri->is_root())                   // not root
                export_empty_import(diri->dir);
@@ -823,7 +826,7 @@ int MDCache::open_root(Context *c)
        assert(root->dir == NULL);
        root->set_dir( new CDir(root, mds, true) );
        root->dir->set_dir_auth( 0 );  // me!
-       root->dir->dir_rep = CDIR_REP_NONE;
+       root->dir->dir_rep = CDIR_REP_ALL;   //NONE;
 
        // root is sort of technically an import (from a vacuum)
        imports.insert( root->dir );
@@ -6796,7 +6799,8 @@ void MDCache::handle_export_dir(MExportDir *m)
 
 
   // is it empty?
-  if (dir->get_size() == 0 &&
+  if (false &&
+         dir->get_size() == 0 &&
          !dir->inode->is_auth()) {
        // reexport!
        export_empty_import(dir);