// -----------------------------------------------------------------------------
#include "ceph_ver.h"
#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
-#include "ErasureCodeIsaTableCache.h"
+#include "ErasureCodePluginIsa.h"
#include "ErasureCodeIsa.h"
// -----------------------------------------------------------------------------
-class ErasureCodePluginIsa : public ErasureCodePlugin {
-public:
- ErasureCodeIsaTableCache tcache;
-
- virtual int factory(const std::string &directory,
+int ErasureCodePluginIsa::factory(const std::string &directory,
ErasureCodeProfile &profile,
ErasureCodeInterfaceRef *erasure_code,
ostream *ss)
- {
+{
ErasureCodeIsa *interface;
std::string t;
if (profile.find("technique") == profile.end())
}
*erasure_code = ErasureCodeInterfaceRef(interface);
return 0;
- }
-};
+}
// -----------------------------------------------------------------------------
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
+ * Copyright (C) 2014 Red Hat <contact@redhat.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_PLUGIN_ISA_H
+#define CEPH_ERASURE_CODE_PLUGIN_ISA_H
+
+#include "erasure-code/ErasureCodePlugin.h"
+#include "ErasureCodeIsaTableCache.h"
+
+class ErasureCodePluginIsa : public ErasureCodePlugin {
+public:
+ ErasureCodeIsaTableCache tcache;
+
+ virtual int factory(const std::string &directory,
+ ErasureCodeProfile &profile,
+ ErasureCodeInterfaceRef *erasure_code,
+ ostream *ss);
+};
+
+#endif
#include "ceph_ver.h"
#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
#include "ErasureCodeJerasure.h"
+#include "ErasureCodePluginJerasure.h"
#include "jerasure_init.h"
#define dout_subsys ceph_subsys_osd
return *_dout << "ErasureCodePluginJerasure: ";
}
-class ErasureCodePluginJerasure : public ErasureCodePlugin {
-public:
- virtual int factory(const std::string& directory,
+int ErasureCodePluginJerasure::factory(const std::string& directory,
ErasureCodeProfile &profile,
ErasureCodeInterfaceRef *erasure_code,
ostream *ss) {
}
*erasure_code = ErasureCodeInterfaceRef(interface);
return 0;
- }
-};
+}
const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
+ * Copyright (C) 2014 Red Hat <contact@redhat.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_PLUGIN_JERASURE_H
+#define CEPH_ERASURE_CODE_PLUGIN_JERASURE_H
+
+#include "erasure-code/ErasureCodePlugin.h"
+
+class ErasureCodePluginJerasure : public ErasureCodePlugin {
+public:
+ virtual int factory(const std::string& directory,
+ ErasureCodeProfile &profile,
+ ErasureCodeInterfaceRef *erasure_code,
+ ostream *ss);
+};
+
+#endif
#include "ceph_ver.h"
#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
+#include "ErasureCodePluginLrc.h"
#include "ErasureCodeLrc.h"
// re-include our assert
#undef dout_prefix
#define dout_prefix _prefix(_dout)
-class ErasureCodePluginLrc : public ErasureCodePlugin {
-public:
- virtual int factory(const std::string &directory,
+int ErasureCodePluginLrc::factory(const std::string &directory,
ErasureCodeProfile &profile,
ErasureCodeInterfaceRef *erasure_code,
ostream *ss) {
}
*erasure_code = ErasureCodeInterfaceRef(interface);
return 0;
- }
};
const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
+ * Copyright (C) 2014 Red Hat <contact@redhat.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_PLUGIN_LRC_H
+#define CEPH_ERASURE_CODE_PLUGIN_LRC_H
+
+#include "erasure-code/ErasureCodePlugin.h"
+
+class ErasureCodePluginLrc : public ErasureCodePlugin {
+public:
+ virtual int factory(const std::string &directory,
+ ErasureCodeProfile &profile,
+ ErasureCodeInterfaceRef *erasure_code,
+ ostream *ss);
+};
+
+#endif
#include "ceph_ver.h"
#include "common/debug.h"
-#include "erasure-code/ErasureCodePlugin.h"
+#include "ErasureCodePluginShec.h"
#include "ErasureCodeShecTableCache.h"
#include "ErasureCodeShec.h"
#include "jerasure_init.h"
return *_dout << "ErasureCodePluginShec: ";
}
-class ErasureCodePluginShec : public ErasureCodePlugin {
-public:
- ErasureCodeShecTableCache tcache;
-
- virtual int factory(const std::string &directory,
+int ErasureCodePluginShec::factory(const std::string &directory,
ErasureCodeProfile &profile,
ErasureCodeInterfaceRef *erasure_code,
ostream *ss) {
dout(10) << "ErasureCodePluginShec: factory() completed" << dendl;
return 0;
- }
-};
+}
const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; }
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph distributed storage system
+ *
+ * Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
+ * Copyright (C) 2014 Red Hat <contact@redhat.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_PLUGIN_SHEC_H
+#define CEPH_ERASURE_CODE_PLUGIN_SHEC_H
+
+#include "ErasureCodeShecTableCache.h"
+#include "erasure-code/ErasureCodePlugin.h"
+
+class ErasureCodePluginShec : public ErasureCodePlugin {
+public:
+ ErasureCodeShecTableCache tcache;
+
+ virtual int factory(const std::string &directory,
+ ErasureCodeProfile &profile,
+ ErasureCodeInterfaceRef *erasure_code,
+ ostream *ss);
+};
+
+#endif