]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
compressor: accept 'none' or '' for none
authorSage Weil <sage@redhat.com>
Sat, 22 Jul 2017 18:56:28 +0000 (14:56 -0400)
committerSage Weil <sage@redhat.com>
Fri, 28 Jul 2017 02:30:12 +0000 (22:30 -0400)
This makes the parse and output methods match up.

Signed-off-by: Sage Weil <sage@redhat.com>
src/compressor/Compressor.cc

index a1ed5e928f9a48b7be4ab295a4f133cac0a9884c..e07fc8dde94a9bb14bc60a93890f37fb014fc7b4 100644 (file)
@@ -41,7 +41,7 @@ boost::optional<Compressor::CompressionAlgorithm> Compressor::get_comp_alg_type(
     return COMP_ALG_ZSTD;
   if (s == "lz4")
     return COMP_ALG_LZ4;
-  if (s == "")
+  if (s == "" || s == "none")
     return COMP_ALG_NONE;
 
   return boost::optional<CompressionAlgorithm>();