MCPcopy Create free account
hub / github.com/ceph/ceph / validate_directory_data

Method validate_directory_data

src/mds/CInode.cc:5077–5097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5075 }
5076
5077 bool validate_directory_data() {
5078 ceph_assert(in->is_dir());
5079
5080 if (in->is_base()) {
5081 if (!shadow_in) {
5082 shadow_in = new CInode(in->mdcache);
5083 in->mdcache->create_unlinked_system_inode(shadow_in, in->ino(), in->get_inode()->mode);
5084 in->mdcache->num_shadow_inodes++;
5085 }
5086 shadow_in->fetch(get_internal_callback(INODE));
5087 if (in->mdcache->mds->logger)
5088 in->mdcache->mds->logger->inc(l_mds_scrub_dir_base_inodes);
5089 return false;
5090 } else {
5091 // TODO: validate on-disk inode for non-base directories
5092 if (in->mdcache->mds->logger)
5093 in->mdcache->mds->logger->inc(l_mds_scrub_dirfrag_rstats);
5094 results->inode.passed = true;
5095 return check_dirfrag_rstats();
5096 }
5097 }
5098
5099 bool _inode_disk(int rval) {
5100 const auto& si = shadow_in->get_inode();

Callers

nothing calls this directly

Calls 7

is_baseMethod · 0.80
is_dirMethod · 0.45
inoMethod · 0.45
get_inodeMethod · 0.45
fetchMethod · 0.45
incMethod · 0.45

Tested by

no test coverage detected