properties, pg_pool_t::TYPE_REPLICATED, ss);
}
+int OSDMonitor::get_erasure_code(const map<string,string> &properties,
+ ErasureCodeInterfaceRef *erasure_code,
+ stringstream &ss)
+{
+ map<string,string>::const_iterator plugin =
+ properties.find("erasure-code-plugin");
+ if (plugin == properties.end()) {
+ ss << "cannot determine the erasure code plugin"
+ << " because erasure-code-plugin is not in the properties "
+ << properties;
+ return -EINVAL;
+ }
+ ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
+ return instance.factory(plugin->second, properties, erasure_code);
+}
+
+
int OSDMonitor::prepare_pool_properties(const unsigned pool_type,
const vector<string> &properties,
map<string,string> *properties_map,
#include "messages/MOSDFailure.h"
#include "messages/MPoolOp.h"
+#include "osd/ErasureCodeInterface.h"
+
#define OSD_METADATA_PREFIX "osd_metadata"
/// information about a particular peer's failure reports for one osd
bool prepare_pool_op (MPoolOp *m);
bool prepare_pool_op_create (MPoolOp *m);
bool prepare_pool_op_delete(MPoolOp *m);
+ int get_erasure_code(const map<string,string> &properties,
+ ErasureCodeInterfaceRef *erasure_code,
+ stringstream &ss);
int prepare_pool_properties(const unsigned pool_type,
const vector<string> &properties,
map<string,string> *properties_map,