cfuse: cfuse.cc client.o osdc.o client/fuse.o msg/SimpleMessenger.o common.o
${CC} ${CFLAGS} ${LIBS} -lfuse $^ -o $@
+activemaster: active/activemaster.cc client.o osdc.o msg/SimpleMessenger.o common.o
+ ${CC} ${CFLAGS} ${LIBS} $^ -o $@
+
+activeslave: active/activeslave.cc client.o osdc.o msg/SimpleMessenger.o common.o
+ ${CC} ${CFLAGS} ${LIBS} $^ -o $@
+
+echotestclient: active/echotestclient.cc client.o osdc.o msg/SimpleMessenger.o common.o
+ ${CC} ${CFLAGS} ${LIBS} $^ -o $@
+
+msgtestclient: active/msgtestclient.cc client.o osdc.o msg/SimpleMessenger.o common.o
+ ${CC} ${CFLAGS} ${LIBS} $^ -o $@
+
+
+
# misc
gprof-helper.so: test/gprof-helper.c
if (f->pos_locked || !f->pos_waiters.empty()) {
Cond cond;
f->pos_waiters.push_back(&cond);
+ dout(10) << "lock_fh_pos BLOCKING on " << f << endl;
while (f->pos_locked || f->pos_waiters.front() != &cond)
cond.Wait(client_lock);
+ dout(10) << "lock_fh_pos UNBLOCKING on " << f << endl;
assert(f->pos_waiters.front() == &cond);
f->pos_waiters.pop_front();
}
dout(10) << "In getblocksize" << endl;
Client* client;
- struct stat stbuf;
+ //struct stat stbuf;
client = *(Client**)&clientp;
jint result;
const char* c_path = env->GetStringUTFChars(j_path, 0);
+
+ /*
if (0 > client->lstat(c_path, &stbuf))
result = -1;
else
result = stbuf.st_blksize;
+ */
+
+ // we need to open the file to retrieve the stripe size
+ dout(10) << "CephFSInterface: getblocksize: opening file" << endl;
+ int fh = client->open(c_path, O_RDONLY);
+ if (fh < 0)
+ return -1;
+
+ result = client->get_stripe_unit(fh);
+
+ int close_result = client->close(fh);
+ assert (close_result > -1);
+
env->ReleaseStringUTFChars(j_path, c_path);
return result;
Mutex _dout_lock;
-FileLayout g_OSD_FileLayout( 1<<23, 1, 1<<23, 2 ); // stripe over 8M objects, 2x replication
+FileLayout g_OSD_FileLayout( 1<<26, 1, 1<<26, 2 ); // stripe over 64M objects, 2x replication
FileLayout g_OSD_MDDirLayout( 1<<23, 1, 1<<23, 2 ); // 8M objects, 2x replication. (a lie)
FileLayout g_OSD_MDLogLayout( 1<<20, 1, 1<<20, 2 ); // 1M objects, 2x replication