const hobject_t &poid,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle) {
+ ThreadPool::TPHandle &handle,
+ ScrubMap* const map) {
bufferhash h(-1); // we always used -1
int r;
uint64_t stride = cct->_conf->osd_deep_scrub_stride;
const hobject_t &obj,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle) override;
+ ThreadPool::TPHandle &handle,
+ ScrubMap* const map = nullptr) override;
uint64_t be_get_ondisk_size(uint64_t logical_size) override {
return sinfo.logical_to_next_chunk_offset(logical_size);
}
// calculate the CRC32 on deep scrubs
if (deep) {
- be_deep_scrub(*p, seed, o, handle);
+ be_deep_scrub(*p, seed, o, handle, &map);
}
dout(25) << __func__ << " " << poid << dendl;
int& large_omap_objects,
ostream &warnstream) const
{
+ bool needs_check = false;
+ for (const auto& map : maps) {
+ if (map.second->has_large_omap_object_errors) {
+ needs_check = true;
+ break;
+ }
+ }
+
+ if (!needs_check) {
+ return;
+ }
+
// Iterate through objects and check large omap object flag
for (const auto& k : master_set) {
for (const auto& map : maps) {
const hobject_t &poid,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle) = 0;
+ ThreadPool::TPHandle &handle,
+ ScrubMap* const map = nullptr) = 0;
void be_large_omap_check(
const map<pg_shard_t,ScrubMap*> &maps,
const set<hobject_t> &master_set,
const hobject_t &poid,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle)
+ ThreadPool::TPHandle &handle,
+ ScrubMap* const map)
{
dout(10) << __func__ << " " << poid << " seed "
<< std::hex << seed << std::dec << dendl;
o.large_omap_object_found = true;
o.large_omap_object_key_count = keys_scanned;
o.large_omap_object_value_size = value_sum;
+ map->has_large_omap_object_errors = true;
}
if (iter->status() < 0) {
const hobject_t &obj,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle) override;
+ ThreadPool::TPHandle &handle,
+ ScrubMap* const map = nullptr) override;
uint64_t be_get_ondisk_size(uint64_t logical_size) override { return logical_size; }
};
map<hobject_t,object> objects;
eversion_t valid_through;
eversion_t incr_since;
+ bool has_large_omap_object_errors:1;
void merge_incr(const ScrubMap &l);
void insert(const ScrubMap &r) {