if (auth.digest_present && candidate.digest_present &&
auth.digest != candidate.digest) {
- format_to(std::back_inserter(out),
- "data_digest {:#x} != data_digest {:#x} from shard {}",
- candidate.digest,
- auth.digest,
- auth_shard);
+ fmt::format_to(std::back_inserter(out),
+ "data_digest {:#x} != data_digest {:#x} from shard {}",
+ candidate.digest,
+ auth.digest,
+ auth_shard);
error = true;
obj_result.set_data_digest_mismatch();
}
if (auth.omap_digest_present && candidate.omap_digest_present &&
auth.omap_digest != candidate.omap_digest) {
- format_to(std::back_inserter(out),
- "{}omap_digest {:#x} != omap_digest {:#x} from shard {}",
- sep(error),
- candidate.omap_digest,
- auth.omap_digest,
- auth_shard);
+ fmt::format_to(std::back_inserter(out),
+ "{}omap_digest {:#x} != omap_digest {:#x} from shard {}",
+ sep(error),
+ candidate.omap_digest,
+ auth.omap_digest,
+ auth_shard);
obj_result.set_omap_digest_mismatch();
}
if (m_is_replicated) {
if (auth_oi.is_data_digest() && candidate.digest_present &&
auth_oi.data_digest != candidate.digest) {
- format_to(std::back_inserter(out),
- "{}data_digest {:#x} != data_digest {:#x} from auth oi {}",
- sep(error),
- candidate.digest,
- auth_oi.data_digest,
- auth_oi);
+ fmt::format_to(std::back_inserter(out),
+ "{}data_digest {:#x} != data_digest {:#x} from auth oi {}",
+ sep(error),
+ candidate.digest,
+ auth_oi.data_digest,
+ auth_oi);
shard_result.set_data_digest_mismatch_info();
}
// for replicated:
if (auth_oi.is_omap_digest() && candidate.omap_digest_present &&
auth_oi.omap_digest != candidate.omap_digest) {
- format_to(std::back_inserter(out),
- "{}omap_digest {:#x} != omap_digest {:#x} from auth oi {}",
- sep(error),
- candidate.omap_digest,
- auth_oi.omap_digest,
- auth_oi);
+ fmt::format_to(std::back_inserter(out),
+ "{}omap_digest {:#x} != omap_digest {:#x} from auth oi {}",
+ sep(error),
+ candidate.omap_digest,
+ auth_oi.omap_digest,
+ auth_oi);
shard_result.set_omap_digest_mismatch_info();
}
}
auth_bl.push_back(auth_attr->second);
if (!can_bl.contents_equal(auth_bl)) {
- format_to(std::back_inserter(out), "{}object info inconsistent ", sep(error));
+ fmt::format_to(std::back_inserter(out),
+ "{}object info inconsistent ",
+ sep(error));
obj_result.set_object_info_inconsistency();
}
}
auth_bl.push_back(auth_attr->second);
if (!can_bl.contents_equal(auth_bl)) {
- format_to(std::back_inserter(out), "{}snapset inconsistent ", sep(error));
+ fmt::format_to(std::back_inserter(out),
+ "{}snapset inconsistent ",
+ sep(error));
obj_result.set_snapset_inconsistency();
}
}
auth_bl.push_back(auth_hi->second);
if (!can_bl.contents_equal(auth_bl)) {
- format_to(std::back_inserter(out), "{}hinfo inconsistent ", sep(error));
+ fmt::format_to(std::back_inserter(out),
+ "{}hinfo inconsistent ",
+ sep(error));
obj_result.set_hinfo_inconsistency();
}
}
uint64_t oi_size = logical_to_ondisk_size(auth_oi.size);
if (oi_size != candidate.size) {
- format_to(std::back_inserter(out),
- "{}size {} != size {} from auth oi {}",
- sep(error),
- candidate.size,
- oi_size,
- auth_oi);
+ fmt::format_to(std::back_inserter(out),
+ "{}size {} != size {} from auth oi {}",
+ sep(error),
+ candidate.size,
+ oi_size,
+ auth_oi);
shard_result.set_size_mismatch_info();
}
if (auth.size != candidate.size) {
- format_to(std::back_inserter(out),
- "{}size {} != size {} from shard {}",
- sep(error),
- candidate.size,
- auth.size,
- auth_shard);
+ fmt::format_to(std::back_inserter(out),
+ "{}size {} != size {} from shard {}",
+ sep(error),
+ candidate.size,
+ auth.size,
+ auth_shard);
obj_result.set_size_mismatch();
}
if (candidate.size > m_conf->osd_max_object_size &&
!obj_result.has_size_too_large()) {
- format_to(std::back_inserter(out),
- "{}size {} > {} is too large",
- sep(error),
- candidate.size,
- m_conf->osd_max_object_size);
+ fmt::format_to(std::back_inserter(out),
+ "{}size {} > {} is too large",
+ sep(error),
+ candidate.size,
+ m_conf->osd_max_object_size);
obj_result.set_size_too_large();
}
auto cand = candidate.attrs.find(k);
if (cand == candidate.attrs.end()) {
- format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k);
+ fmt::format_to(std::back_inserter(out),
+ "{}attr name mismatch '{}'",
+ sep(error),
+ k);
obj_result.set_attr_name_mismatch();
} else if (cand->second.cmp(v)) {
- format_to(std::back_inserter(out), "{}attr value mismatch '{}'", sep(error), k);
+ fmt::format_to(std::back_inserter(out),
+ "{}attr value mismatch '{}'",
+ sep(error),
+ k);
obj_result.set_attr_value_mismatch();
}
}
auto in_auth = auth.attrs.find(k);
if (in_auth == auth.attrs.end()) {
- format_to(std::back_inserter(out), "{}attr name mismatch '{}'", sep(error), k);
+ fmt::format_to(std::back_inserter(out),
+ "{}attr name mismatch '{}'",
+ sep(error),
+ k);
obj_result.set_attr_name_mismatch();
}
}
// note: 'if' chain, as hard to consistently (on all compilers) avoid some
// warnings for a switch plus multiple return paths
if (as_auth.possible_auth == shard_as_auth_t::usable_t::not_usable) {
- return format_to(ctx.out(),
- "{{shard-not-usable:{}}}",
- as_auth.error_text);
+ return fmt::format_to(ctx.out(),
+ "{{shard-not-usable:{}}}",
+ as_auth.error_text);
}
if (as_auth.possible_auth == shard_as_auth_t::usable_t::not_found) {
- return format_to(ctx.out(), "{{shard-not-found}}");
+ return fmt::format_to(ctx.out(), "{{shard-not-found}}");
}
- return format_to(ctx.out(),
- "{{shard-usable: soid:{} {{txt:{}}} }}",
- as_auth.oi.soid,
- as_auth.error_text);
+ return fmt::format_to(ctx.out(),
+ "{{shard-usable: soid:{} {{txt:{}}} }}",
+ as_auth.oi.soid,
+ as_auth.error_text);
} else {
- return format_to(
+ return fmt::format_to(
ctx.out(),
"usable:{} soid:{} {{txt:{}}}",
(as_auth.possible_auth == shard_as_auth_t::usable_t::usable) ? "yes"