"oi_attr_missing",
"oi_attr_corrupted",
"obj_size_oi_mismatch",
- "ss_attr_missing",
- "ss_attr_corrupted",
+ "snapset_missing",
+ "snapset_corrupted",
"hinfo_missing",
"hinfo_corrupted"
]
"oi_attr_missing",
"oi_attr_corrupted",
"obj_size_oi_mismatch",
- "ss_attr_missing",
- "ss_attr_corrupted",
+ "snapset_missing",
+ "snapset_corrupted",
"hinfo_missing",
"hinfo_corrupted"
]
"type": "array",
"items": {
"enum": [
- "ss_attr_missing",
- "ss_attr_corrupted",
+ "snapset_missing",
+ "snapset_corrupted",
"oi_attr_missing",
"oi_attr_corrupted",
"snapset_mismatch",
}
],
"errors": [
- "ss_attr_missing"
+ "snapset_missing"
],
"osd": 0,
"primary": false,
}
],
"errors": [
- "ss_attr_corrupted"
+ "snapset_corrupted"
],
"osd": 1,
"primary": true,
}
],
"union_shard_errors": [
- "ss_attr_missing",
- "ss_attr_corrupted"
+ "snapset_missing",
+ "snapset_corrupted"
]
},
{
],
"data_digest": "0x2ddbf8f5",
"errors": [
- "ss_attr_missing"
+ "snapset_missing"
],
"omap_digest": "0x8b699207",
"osd": 0,
],
"data_digest": "0x2ddbf8f5",
"errors": [
- "ss_attr_corrupted"
+ "snapset_corrupted"
],
"omap_digest": "0x8b699207",
"osd": 1,
}
],
"union_shard_errors": [
- "ss_attr_missing",
- "ss_attr_corrupted"
+ "snapset_missing",
+ "snapset_corrupted"
]
},
{
},
{
"errors": [
- "ss_attr_corrupted"
+ "snapset_corrupted"
],
"snap": "head",
"locator": "",
4
],
"errors": [
- "ss_attr_missing",
+ "snapset_missing",
"extra_clones"
],
"snap": "head",
errors |= inc_snapset_t::HEADLESS_CLONE;
}
-void inconsistent_snapset_wrapper::set_ss_attr_missing()
+void inconsistent_snapset_wrapper::set_snapset_missing()
{
errors |= inc_snapset_t::SNAPSET_MISSING;
}
errors |= inc_snapset_t::OI_MISSING;
}
-void inconsistent_snapset_wrapper::set_ss_attr_corrupted()
+void inconsistent_snapset_wrapper::set_snapset_corrupted()
{
errors |= inc_snapset_t::SNAPSET_CORRUPTED;
}
void set_oi_attr_corrupted() {
errors |= err_t::OI_ATTR_CORRUPTED;
}
- void set_ss_attr_missing() {
- errors |= err_t::SS_ATTR_MISSING;
+ void set_snapset_missing() {
+ errors |= err_t::SNAPSET_MISSING;
}
- void set_ss_attr_corrupted() {
- errors |= err_t::SS_ATTR_CORRUPTED;
+ void set_snapset_corrupted() {
+ errors |= err_t::SNAPSET_CORRUPTED;
}
void set_obj_size_oi_mismatch() {
errors |= err_t::OBJ_SIZE_OI_MISMATCH;
void set_headless();
// soid claims that it is a head or a snapdir, but its SS_ATTR
// is missing.
- void set_ss_attr_missing();
+ void set_snapset_missing();
void set_oi_attr_missing();
- void set_ss_attr_corrupted();
+ void set_snapset_corrupted();
void set_oi_attr_corrupted();
// snapset with missing clone
void set_clone_missing(snapid_t);
SHARD_EC_SIZE_MISMATCH = 1 << 13,
OI_ATTR_MISSING = 1 << 14,
OI_ATTR_CORRUPTED = 1 << 15,
- SS_ATTR_MISSING = 1 << 16,
- SS_ATTR_CORRUPTED = 1 << 17,
+ SS_ATTR_MISSING = 1 << 16, // Old
+ SNAPSET_MISSING = 1 << 16,
+ SS_ATTR_CORRUPTED = 1 << 17, // Old
+ SNAPSET_CORRUPTED = 1 << 17,
OBJ_SIZE_OI_MISMATCH = 1 << 18,
HINFO_MISSING = 1 << 19,
HINFO_CORRUPTED = 1 << 20
// When adding more here add to either SHALLOW_ERRORS or DEEP_ERRORS
};
uint64_t errors = 0;
- static constexpr uint64_t SHALLOW_ERRORS = SHARD_MISSING|SHARD_STAT_ERR|SIZE_MISMATCH_OI|OI_ATTR_MISSING|OI_ATTR_CORRUPTED|SS_ATTR_MISSING|SS_ATTR_CORRUPTED|OBJ_SIZE_OI_MISMATCH|HINFO_MISSING|HINFO_CORRUPTED;
+ static constexpr uint64_t SHALLOW_ERRORS = SHARD_MISSING|SHARD_STAT_ERR|SIZE_MISMATCH_OI|OI_ATTR_MISSING|OI_ATTR_CORRUPTED|SNAPSET_MISSING|SNAPSET_CORRUPTED|OBJ_SIZE_OI_MISMATCH|HINFO_MISSING|HINFO_CORRUPTED;
static constexpr uint64_t DEEP_ERRORS = SHARD_READ_ERR|DATA_DIGEST_MISMATCH_OI|OMAP_DIGEST_MISMATCH_OI|SHARD_EC_HASH_MISMATCH|SHARD_EC_SIZE_MISMATCH;
bool has_shard_missing() const {
return errors & SHARD_MISSING;
bool has_oi_attr_corrupted() const {
return errors & OI_ATTR_CORRUPTED;
}
- bool has_ss_attr_missing() const {
+ bool has_ss_attr_missing() const { // Compatibility
return errors & SS_ATTR_MISSING;
}
- bool has_ss_attr_corrupted() const {
+ bool has_snapset_missing() const {
+ return errors & SNAPSET_MISSING;
+ }
+ bool has_ss_attr_corrupted() const { // Compatibility
return errors & SS_ATTR_CORRUPTED;
}
+ bool has_snapset_corrupted() const {
+ return errors & SNAPSET_CORRUPTED;
+ }
bool has_shallow_errors() const {
return errors & SHALLOW_ERRORS;
}
std::vector<snap_t> clones;
std::vector<snap_t> missing;
- bool ss_attr_missing() const {
+ bool ss_attr_missing() const { // Compatibility
return errors & SNAPSET_MISSING;
}
- bool ss_attr_corrupted() const {
+ bool snapset_missing() const {
+ return errors & SNAPSET_MISSING;
+ }
+ bool ss_attr_corrupted() const { // Compatibility
+ return errors & SNAPSET_CORRUPTED;
+ }
+ bool snapset_corrupted() const {
return errors & SNAPSET_CORRUPTED;
}
bool clone_missing() const {
if (obj.is_head()) {
k = i->second.attrs.find(SS_ATTR);
if (k == i->second.attrs.end()) {
- shard_info.set_ss_attr_missing();
- error_string += " ss_attr_missing";
+ shard_info.set_snapset_missing();
+ error_string += " snapset_missing";
} else {
ss_bl.push_back(k->second);
try {
}
} catch (...) {
// invalid snapset, probably corrupt
- shard_info.set_ss_attr_corrupted();
- error_string += " ss_attr_corrupted";
+ shard_info.set_snapset_corrupted();
+ error_string += " snapset_corrupted";
}
}
}
<< " no '" << SS_ATTR << "' attr";
++scrubber.shallow_errors;
snapset = boost::none;
- head_error.set_ss_attr_missing();
+ head_error.set_snapset_missing();
} else {
bufferlist bl;
bl.push_back(p->second.attrs[SS_ATTR]);
osd->clog->error() << mode << " " << info.pgid << " " << soid
<< " can't decode '" << SS_ATTR << "' attr " << e.what();
++scrubber.shallow_errors;
- head_error.set_ss_attr_corrupted();
+ head_error.set_snapset_corrupted();
}
}
f.dump_string("error", "oi_attr_corrupted");
if (err.has_obj_size_oi_mismatch())
f.dump_string("error", "obj_size_oi_mismatch");
- if (err.has_ss_attr_missing())
- f.dump_string("error", "ss_attr_missing");
- if (err.has_ss_attr_corrupted())
- f.dump_string("error", "ss_attr_corrupted");
+ if (err.has_snapset_missing())
+ f.dump_string("error", "snapset_missing");
+ if (err.has_snapset_corrupted())
+ f.dump_string("error", "snapset_corrupted");
if (err.has_hinfo_missing())
f.dump_string("error", "hinfo_missing");
if (err.has_hinfo_corrupted())
decode(oi, bliter); // Can't be corrupted
f.dump_stream("object_info") << oi;
}
- if (!shard.has_ss_attr_missing() && !shard.has_ss_attr_corrupted() &&
+ if (!shard.has_snapset_missing() && !shard.has_snapset_corrupted() &&
inc.has_snapset_inconsistency()) {
SnapSet ss;
bufferlist bl;
if (inc.has_attr_name_mismatch() || inc.has_attr_value_mismatch()
|| inc.union_shards.has_oi_attr_missing()
|| inc.union_shards.has_oi_attr_corrupted()
- || inc.union_shards.has_ss_attr_missing()
- || inc.union_shards.has_ss_attr_corrupted()
+ || inc.union_shards.has_snapset_missing()
+ || inc.union_shards.has_snapset_corrupted()
|| inc.union_shards.has_hinfo_missing()
|| inc.union_shards.has_hinfo_corrupted()) {
f.open_array_section("attrs");
dump_object_id(inc.object, f);
f.open_array_section("errors");
- if (inc.ss_attr_missing())
- f.dump_string("error", "ss_attr_missing");
- if (inc.ss_attr_corrupted())
- f.dump_string("error", "ss_attr_corrupted");
+ if (inc.snapset_missing())
+ f.dump_string("error", "snapset_missing");
+ if (inc.snapset_corrupted())
+ f.dump_string("error", "snapset_corrupted");
if (inc.oi_attr_missing())
f.dump_string("error", "oi_attr_missing");
if (inc.oi_attr_corrupted())