]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: create missing temp collection/dir
authorSage Weil <sage@newdream.net>
Thu, 22 Jul 2010 23:03:53 +0000 (16:03 -0700)
committerSage Weil <sage@newdream.net>
Fri, 23 Jul 2010 22:51:37 +0000 (15:51 -0700)
src/osd/OSD.cc

index f431bb7217332f72656fddea650d8b9f941a75df..fb83d667dc370c57bab537562409afbbeec782c1 100644 (file)
@@ -481,6 +481,14 @@ int OSD::init()
 
   clear_temp();
 
+  // make sure (newish) temp dir exists
+  if (!store->collection_exists(coll_t(coll_t::TYPE_TEMP))) {
+    dout(10) << "creating temp pg dir" << dendl;
+    ObjectStore::Transaction t;
+    t.create_collection(coll_t(coll_t::TYPE_TEMP));
+    store->apply_transaction(t);
+  }
+
   // load up pgs (as they previously existed)
   load_pgs();