From 66045f52080766743bdc1b267ca084c2a12af53f Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 22 Jul 2009 15:54:50 -0700 Subject: [PATCH] libceph: Added get_stripe_unit method; used by Hadoop. --- src/client/libceph.cc | 8 ++++++-- src/client/libceph.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client/libceph.cc b/src/client/libceph.cc index b0a6792187cdc..0d4b796716671 100644 --- a/src/client/libceph.cc +++ b/src/client/libceph.cc @@ -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 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& names) { return client->getdir(relpath, names); diff --git a/src/client/libceph.h b/src/client/libceph.h index 98109a0a687f0..d737fb0db3f70 100644 --- a/src/client/libceph.h +++ b/src/client/libceph.h @@ -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& names); //not for C, sorry! } -- 2.39.5