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 $@
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;
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();
}
}
// timer?
if (pending_timer) {
+ pending_timer = false;
dout(5) << "pending timer" << endl;
g_timer.execute_pending();
}
#include <ext/hash_map>
using namespace __gnu_cxx;
-
+#include <errno.h>
# include <netdb.h>
# include <sys/socket.h>
# include <netinet/in.h>
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;
}
}
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
#include "OBFSStore.h"
+
+extern "C" {
#include "../include/uofs.h"
-#include "../include/types.h"
+}
+#include "include/types.h"
#include <unistd.h>
#include <stdlib.h>
#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"
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];
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) {