and make sure it does not dispose JSON for recursive scrub
on ~mdsdir while scrubbing with flag 'scrub_mdsdir'
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit
b32c572192fea394d1f56fb0e3d0f6cf672d5ec3)
have_more = false;
auto& header = p.second;
+ if (mdcache->get_inode(header->get_origin())->is_mdsdir()
+ && header->get_scrub_mdsdir() && header->get_tag().empty()) {
+ continue;
+ }
+
std::string tag(header->get_tag());
f->open_object_section(tag.c_str()); // scrub id
}
*optcss << "force";
}
+ if (header->get_scrub_mdsdir()) {
+ if (have_more) {
+ *optcss << ",";
+ }
+ *optcss << "scrub_mdsdir";
+ }
f->dump_string("options", optcss->strv());
f->close_section(); // scrub id