]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1385 29311d96-e01e-0410-9327-a35deaa...
authoreestolan <eestolan@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 30 May 2007 23:03:25 +0000 (23:03 +0000)
committereestolan <eestolan@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 30 May 2007 23:03:25 +0000 (23:03 +0000)
trunk/ceph/Makefile
trunk/ceph/client/Client.cc
trunk/ceph/client/hadoop/CephFSInterface.cc
trunk/ceph/config.cc

index 6248f207959d4b6260bbaf96855f143eafcccf28..ccc3b1eec9491823c406efeeda57120c7a64e776 100644 (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
index 3d022b294b20902b5f30d0d5dd8a46b91913f94d..12e95eeb142062ec81e789e0744f870ca42402a7 100644 (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();
   }
index 92cefa3f1c6c53819ba2549c174a19dce12cfdf7..7aa8c133d370b2a9398a7bee200ae5b41979c93f 100644 (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;
index 345f979be929df02fe2cede38877435e69705e56..13842821a4f4d982399108c538e25cae2c0e16c8 100644 (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