ceph cconf \
mkmonfs monmaptool osdmaptool crushtool \
streamtest dupstore dumpjournal testmsgr \
- testrados testradospp \
+ testceph testrados testradospp \
rados radosacl s3gw
sbin_PROGRAMS = \
# libceph
libceph_la_SOURCES = \
client/libceph.cc \
+ client/Client.cc \
msg/SimpleMessenger.cc \
- ${libcommon_a_SOURCES}
+ ${libcommon_a_SOURCES} \
+ ${libcrush_a_SOURCES} \
+ ${libosdc_a_SOURCES}
+
libceph_la_CFLAGS = ${AM_CFLAGS}
libceph_la_CXXFLAGS= ${AM_CXXFLAGS}
libceph_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex 'ceph_.*'
lib_LTLIBRARIES += libceph.la
+testceph_SOURCES = client/testceph.cc
+testceph_LDADD = libceph.la
# libcrush.so
libcrush_la_SOURCES = \
crush/builder.c \
#include <string.h>
#include <fcntl.h>
+#include <iostream>
#include "common/Mutex.h"
#include "messages/MMonMap.h"
//network connection
rank = new SimpleMessenger();
rank->bind();
+
+ //at last the client
+ client = new Client(rank->register_entity(entity_name_t::CLIENT()), monclient);
+
rank->start();
rank->set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossy_fast_fail());
rank->set_policy(entity_name_t::TYPE_MDS, SimpleMessenger::Policy::lossless());
rank->set_policy(entity_name_t::TYPE_OSD, SimpleMessenger::Policy::lossless());
- //at last the client
- client = new Client(rank->register_entity(entity_name_t::CLIENT()), monclient);
client->init();
++client_initialized;
extern "C" {
#endif
-int ceph_initialize(int argc, const char **argv); // FIX_ME
+int ceph_initialize(int argc, const char **argv);
void ceph_deinitialize();
int ceph_mount();
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#include "libceph.h"
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, const char **argv)
+{
+ if (ceph_initialize(argc, argv) < 0) {
+ cerr << "error initializing\n" << endl;
+ return(1);
+ }
+ cout << "Successfully initialized Ceph!" << std::endl;
+
+ if(ceph_mount() < 0) {
+ cerr << "error mounting\n" << endl;
+ return(1);
+ }
+ cout << "Successfully mounted Ceph!" << std::endl;
+
+ ceph_deinitialize();
+ cout << "Successfully deinitialized Ceph!" << std::endl;
+
+ return 0;
+}