]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libceph: Added get_stripe_unit method; used by Hadoop.
authorGreg Farnum <gregf@hq.newdream.net>
Wed, 22 Jul 2009 22:54:50 +0000 (15:54 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 22 Jul 2009 22:54:50 +0000 (15:54 -0700)
src/client/libceph.cc
src/client/libceph.h

index b0a6792187cdc0bf885b7b8a58ec9f649c747f2c..0d4b7967166719ba2e89eff72d6f4f2944821f7f 100644 (file)
@@ -21,8 +21,7 @@ static MonClient *monclient = NULL;
 static SimpleMessenger *rank = NULL;
 
 extern "C" int ceph_initialize(int argc, const char **argv)
-{
-  ceph_client_mutex.Lock();
+{  ceph_client_mutex.Lock();
   if (!client_initialized) {
     //create everything to start a client
     vector<const char*> args;
@@ -246,6 +245,11 @@ extern "C" int ceph_sync_fs()
   return client->sync_fs();
 }
 
+extern "C" int ceph_get_stripe_unit(int fh)
+{
+  return client->get_stripe_unit(fh);
+}
+
 int ceph_getdir(const char *relpath, std::list<std::string>& names)
 {
   return client->getdir(relpath, names);
index 98109a0a687f080cd4a6798a71fe0824e627c2fa..d737fb0db3f70b12658cebddc7f48929987d87b1 100644 (file)
@@ -69,6 +69,7 @@ int ceph_fsync(int fd, bool syncdataonly);
 int ceph_fstat(int fd, struct stat *stbuf);
 
 int ceph_sync_fs();
+int ceph_get_stripe_unit(int fh);
 #ifdef __cplusplus
 int ceph_getdir(const char *relpath, std::list<std::string>& names); //not for C, sorry!
 }