summaryrefslogtreecommitdiffstats
path: root/src/compressor
diff options
context:
space:
mode:
Diffstat (limited to 'src/compressor')
-rw-r--r--src/compressor/CompressionPlugin.h11
-rw-r--r--src/compressor/Compressor.cc4
-rw-r--r--src/compressor/Compressor.h3
3 files changed, 13 insertions, 5 deletions
diff --git a/src/compressor/CompressionPlugin.h b/src/compressor/CompressionPlugin.h
index 5e0ed777b85..2a21f2fef27 100644
--- a/src/compressor/CompressionPlugin.h
+++ b/src/compressor/CompressionPlugin.h
@@ -22,22 +22,23 @@
#include <iostream>
#include "common/PluginRegistry.h"
+#include "include/common_fwd.h"
#include "Compressor.h"
namespace ceph {
class CompressionPlugin : public Plugin {
public:
- CompressorRef compressor;
+ TOPNSPC::CompressorRef compressor;
- explicit CompressionPlugin(CephContext *cct) : Plugin(cct),
- compressor(0)
+ explicit CompressionPlugin(CephContext *cct)
+ : Plugin(cct)
{}
~CompressionPlugin() override {}
- virtual int factory(CompressorRef *cs,
- std::ostream *ss) = 0;
+ virtual int factory(TOPNSPC::CompressorRef *cs,
+ std::ostream *ss) = 0;
virtual const char* name() {return "CompressionPlugin";}
};
diff --git a/src/compressor/Compressor.cc b/src/compressor/Compressor.cc
index e6faae164f1..4cd3406d7a9 100644
--- a/src/compressor/Compressor.cc
+++ b/src/compressor/Compressor.cc
@@ -24,6 +24,8 @@
#include "common/debug.h"
#include "common/dout.h"
+namespace TOPNSPC {
+
const char* Compressor::get_comp_alg_name(int a) {
auto p = std::find_if(std::cbegin(compression_algorithms), std::cend(compression_algorithms),
@@ -100,3 +102,5 @@ CompressorRef Compressor::create(CephContext *cct, int alg)
std::string type_name = get_comp_alg_name(alg);
return create(cct, type_name);
}
+
+} // namespace TOPNSPC
diff --git a/src/compressor/Compressor.h b/src/compressor/Compressor.h
index 6a4eb277668..d615e866b55 100644
--- a/src/compressor/Compressor.h
+++ b/src/compressor/Compressor.h
@@ -27,6 +27,8 @@
#include "QatAccel.h"
#endif
+namespace TOPNSPC {
+
class Compressor;
typedef std::shared_ptr<Compressor> CompressorRef;
@@ -103,4 +105,5 @@ protected:
};
+} // namespace TOPNSPC
#endif