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

Method _invalidate_kernel_dcache

src/client/Client.cc:4987–5007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4985};
4986
4987void Client::_invalidate_kernel_dcache()
4988{
4989 RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
4990 if (!mref_reader.is_state_satisfied())
4991 return;
4992
4993 if (can_invalidate_dentries) {
4994 if (dentry_invalidate_cb && root->dir) {
4995 for (auto p = root->dir->dentries.begin();
4996 p != root->dir->dentries.end();
4997 ++p) {
4998 if (p->second->inode)
4999 _schedule_invalidate_dentry_callback(p->second, false);
5000 }
5001 }
5002 } else if (remount_cb) {
5003 // Hacky:
5004 // when remounting a file system, linux kernel trims all unused dentries in the fs
5005 remount_finisher.queue(new C_Client_Remount(this));
5006 }
5007}
5008
5009void Client::_trim_negative_child_dentries(const InodeRef& in)
5010{

Callers

nothing calls this directly

Calls 4

is_state_satisfiedMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
queueMethod · 0.45

Tested by

no test coverage detected