Merge pull request #46063 from vshankar/wip-55170

mds: fetch all dirfrag entries when no dentry keys are requested

Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
Venky Shankar 2022-05-14 15:12:13 +05:30 committed by GitHub
commit 450cdbaab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,5 @@
overrides:
ceph:
cephfs:
mds_dir_prefetch: false
conf:
mds:
mds_dir_prefetch: false

View File

@ -1,4 +1,5 @@
overrides:
ceph:
cephfs:
mds_dir_prefetch: true
conf:
mds:
mds_dir_prefetch: true

View File

@ -5975,7 +5975,7 @@ bool MDCache::open_undef_inodes_dirfrags()
} else if (!p.first) {
p.second.push_back(dn->key());
}
}
}
}
if (fetch_queue.empty())
@ -5997,10 +5997,11 @@ bool MDCache::open_undef_inodes_dirfrags()
continue;
if (dir->state_test(CDir::STATE_REJOINUNDEF))
ceph_assert(diri->dirfragtree.is_leaf(dir->get_frag()));
if (p.second.first)
if (p.second.first || p.second.second.empty()) {
dir->fetch(gather.new_sub());
else
} else {
dir->fetch_keys(p.second.second, gather.new_sub());
}
}
ceph_assert(gather.has_subs());
gather.activate();