do not enable lz4 compressor plugin unless HAVE_LZ4 is ON. so, for
example, when the compressor type is "random", the compressor factory
won't complain with:
load failed dlopen(): "/usr/lib64/ceph/compressor/libceph_lz4.so: cannot
open shared object file: No such file or directory"
anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
case COMP_ALG_SNAPPY: return "snappy";
case COMP_ALG_ZLIB: return "zlib";
case COMP_ALG_ZSTD: return "zstd";
+#ifdef HAVE_LZ4
case COMP_ALG_LZ4: return "lz4";
+#endif
default: return "???";
}
}
return COMP_ALG_ZLIB;
if (s == "zstd")
return COMP_ALG_ZSTD;
+#ifdef HAVE_LZ4
if (s == "lz4")
return COMP_ALG_LZ4;
+#endif
if (s == "" || s == "none")
return COMP_ALG_NONE;
COMP_ALG_SNAPPY = 1,
COMP_ALG_ZLIB = 2,
COMP_ALG_ZSTD = 3,
+#ifdef HAVE_LZ4
COMP_ALG_LZ4 = 4,
+#endif
COMP_ALG_LAST //the last value for range checks
};
// compression options