]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 28 Jun 2005 03:40:37 +0000 (03:40 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 28 Jun 2005 03:40:37 +0000 (03:40 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@349 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/Makefile
ceph/mds/MDS.cc
ceph/msg/FakeMessenger.cc
ceph/msg/TCPMessenger.cc
ceph/osd/FakeStore.cc
ceph/osd/OBFSStore.cc
ceph/osd/OSD.cc

index 1938adc8af21d9819e17480f0b779cac80b3ed1e..d88159fd3ef8105f2a39a273f6ee8af1b237c0dc 100644 (file)
@@ -109,8 +109,8 @@ mpisyn: mpisyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OSD.
 tcpsyn: tcpsyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OSD.o msg/TCPMessenger.cc ${COMMON_OBJS}
        ${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@
 
-obfstest: tcpsyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OBFSOSD.o osd/OBFSStore.o msg/TCPMessenger.cc ${COMMON_OBJS} 
-       ${MPICC} ${MPICFLAGS} ${MPILIBS} $^ -o $@ ./lib/uofs.a
+obfstest: tcpsyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OSD.cc osd/OBFSStore.o msg/TCPMessenger.cc ${COMMON_OBJS} 
+       ${MPICC} -DUSE_OBFS ${MPICFLAGS} ${MPILIBS} $^ -o $@ ./lib/uofs.a
 
 fakesyn: fakesyn.cc mds/allmds.o client/Client.o client/SyntheticClient.o osd/OSD.o msg/FakeMessenger.o ${COMMON_OBJS}
        ${CC} -pg ${CFLAGS} ${LIBS} $^ -o $@
index 9c3b572c89eebe4de5aa2c6664fa61e2d21abd2d..9dbab8a080bb9bef00e79a093bfd51ce2eabd3b7 100644 (file)
@@ -506,6 +506,9 @@ void MDS::handle_client_mount(MClientMount *m)
          dir->mark_complete();
          dir->mark_dirty();
 
+         // fake out idalloc (reset, pretend loaded)
+         idalloc->reset();
+
          if (cmd == MDS_MKFS_FULL) {
                // wipe osds too
                dout(3) << "wiping osds too" << endl;
@@ -513,9 +516,6 @@ void MDS::handle_client_mount(MClientMount *m)
                filer->mkfs(new C_MDS_Unpause(this));
                waiting_for_unpause.push_back(new C_MDS_RetryMessage(this, m));
                return;
-         } else {
-               // fake out idalloc (reset, pretend loaded)
-               idalloc->reset();
          }
          
        }
index 1946e9d46f35bef3f76e66be03824b671edb4c86..a999d9bbf907a16f64bd60d2914156392f32f523 100644 (file)
@@ -129,6 +129,7 @@ int fakemessenger_do_loop_2()
 
        // timer?
        if (pending_timer) {
+         pending_timer = false;
          dout(5) << "pending timer" << endl;
          g_timer.execute_pending();
        }
index 6523e364ffa224af46ca4fa062c85e258c6292a3..a89370880f4a78ab860d59edbe68c06a42244265 100644 (file)
@@ -14,7 +14,7 @@ using namespace std;
 #include <ext/hash_map>
 using namespace __gnu_cxx;
 
-
+#include <errno.h>
 # include <netdb.h>
 # include <sys/socket.h>
 # include <netinet/in.h>
index f2b5ab33ee3cf0d8d35ae5db2e34a9901b80ff46..5ad0593f4962e42114ff308c35cf0ff7fab6c290 100644 (file)
@@ -266,7 +266,7 @@ int FakeStore::read(object_t oid,
          if (fd < 0) 
                return fd;    // no shadow either.
        } else {
-         dout(1) << "couldn't open " << fn.c_str() << " errno " << errno << " " << strerror(errno) << endl;
+         dout(1) << "read couldn't open " << fn.c_str() << " errno " << errno << " " << strerror(errno) << endl;
          return fd;
        }
   }
@@ -299,7 +299,7 @@ int FakeStore::write(object_t oid,
   if (do_fsync && g_conf.osd_writesync) flags |= O_SYNC;
   int fd = ::open(fn.c_str(), flags);
   if (fd < 0) {
-       dout(1) << "couldn't open " << fn.c_str() << " flags " << flags << " errno " << errno << " " << strerror(errno) << endl;
+       dout(1) << "write couldn't open " << fn.c_str() << " flags " << flags << " errno " << errno << " " << strerror(errno) << endl;
        return fd;
   }
   ::flock(fd, LOCK_EX);    // lock for safety
index 7aa794bf931ff0ec6714f76ca4bb2c0d53e2ebbe..8f8d285d9c5efbf292b327eb1b5c395413361703 100644 (file)
@@ -1,7 +1,10 @@
 
 #include "OBFSStore.h"
+
+extern "C" {
 #include "../include/uofs.h"
-#include "../include/types.h"
+}
+#include "include/types.h"
 
 #include <unistd.h>
 #include <stdlib.h>
index f186551eda399e2d408275bfd2674f802e0be8e5..ef3582f46bef688a45549e69376edb206dc85fe4 100644 (file)
@@ -2,9 +2,15 @@
 #include "include/types.h"
 
 #include "OSD.h"
-#include "FakeStore.h"
 #include "OSDCluster.h"
 
+#ifdef USE_OBFS
+# include "OBFSStore.h"
+#else
+# include "FakeStore.h"
+#endif
+
+
 #include "mds/MDS.h"
 
 #include "msg/Messenger.h"
@@ -53,7 +59,11 @@ OSD::OSD(int id, Messenger *m)
   osdcluster = 0;
 
   // use fake store
+#ifdef USE_OBFS
+  store = new OBFSStore(whoami, "./param.in", NULL);
+#else
   store = new FakeStore(osd_base_path, whoami);
+#endif
 
   // monitor
   char s[80];
@@ -331,7 +341,6 @@ void OSD::op_read(MOSDOp *r)
   long got = store->read(r->get_oid(), 
                                                 r->get_length(), r->get_offset(),
                                                 bptr.c_str());
-
   // set up reply
   MOSDOpReply *reply = new MOSDOpReply(r, 0, osdcluster); 
   if (got >= 0) {