static int build_map_buf(CephContext *cct, const krbd_spec& spec,
const string& options, string *pbuf)
{
- bool msgr2 = false;
+ bool msgr2 = true;
+ bool ms_mode_specified = false;
std::ostringstream oss;
int r;
if (boost::starts_with(t, "ms_mode=")) {
/* msgr2 unless ms_mode=legacy */
msgr2 = t.compare(8, t.npos, "legacy");
+ ms_mode_specified = true;
}
}
if (!options.empty())
oss << "," << options;
+
+ /* setting default messenger: msgr2 in prefer-crc mode */
+ if (!ms_mode_specified) {
+ oss << ",ms_mode=prefer-crc";
+ }
+
if (!spec.nspace_name.empty())
oss << ",_pool_ns=" << spec.nspace_name;