git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1385 29311d96-e01e-0410-9327-a35deaab8ce9

This commit is contained in:
eestolan 2007-05-30 23:03:25 +00:00
parent 9fd9096d60
commit 10db8156e1
4 changed files with 33 additions and 2 deletions

View File

@ -136,6 +136,20 @@ csyn: csyn.cc client.o osdc.o msg/SimpleMessenger.o common.o
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

View File

@ -2505,8 +2505,10 @@ void Client::lock_fh_pos(Fh *f)
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();
}

View File

@ -345,16 +345,31 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_fs_ceph_CephFileSystem_ceph_1getb
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;

View File

@ -34,7 +34,7 @@ Mutex bufferlock;
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