require-osd-release octopus"). Otherwise it should be limited to read-only
workloads such as images mapped read-only everywhere or snapshots.
+* compression_hint=none - Don't set compression hints (since 5.8, default).
+
+* compression_hint=compressible - Hint to the underlying OSD object store
+ backend that the data is compressible, enabling compression in passive mode
+ (since 5.8).
+
+* compression_hint=incompressible - Hint to the underlying OSD object store
+ backend that the data is incompressible, disabling compression in aggressive
+ mode (since 5.8).
+
`rbd device unmap` options:
* force - Force the unmapping of a block device that is open (since 4.9). The
return "";
}
+static std::string map_option_compression_hint_cb(const char *value_char)
+{
+ if (!strcmp(value_char, "none") || !strcmp(value_char, "compressible") ||
+ !strcmp(value_char, "incompressible")) {
+ return value_char;
+ }
+ return "";
+}
+
static void put_map_option(const std::string &key, const std::string &val)
{
map_options[key] = val;
if (put_map_option_value("read_from_replica", value_char,
map_option_read_from_replica_cb))
return -EINVAL;
+ } else if (!strcmp(this_char, "compression_hint")) {
+ if (put_map_option_value("compression_hint", value_char,
+ map_option_compression_hint_cb))
+ return -EINVAL;
} else {
std::cerr << "rbd: unknown map option '" << this_char << "'" << std::endl;
return -EINVAL;