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

Method check_cap_issue

src/client/Client.cc:4718–4733  ·  view source on GitHub ↗

checks common to add_update_cap, handle_cap_grant

Source from the content-addressed store, hash-verified

4716
4717// checks common to add_update_cap, handle_cap_grant
4718void Client::check_cap_issue(Inode *in, unsigned issued)
4719{
4720 unsigned had = in->caps_issued();
4721
4722 if ((issued & CEPH_CAP_FILE_CACHE) &&
4723 !(had & CEPH_CAP_FILE_CACHE))
4724 in->cache_gen++;
4725
4726 if ((issued & CEPH_CAP_FILE_SHARED) !=
4727 (had & CEPH_CAP_FILE_SHARED)) {
4728 if (issued & CEPH_CAP_FILE_SHARED)
4729 in->shared_gen++;
4730 if (in->is_dir())
4731 clear_dir_complete_and_ordered(in, true);
4732 }
4733}
4734
4735void Client::add_update_cap(Inode *in, MetaSession *mds_session, uint64_t cap_id,
4736 unsigned issued, unsigned wanted, unsigned seq, unsigned mseq,

Callers

nothing calls this directly

Calls 2

caps_issuedMethod · 0.80
is_dirMethod · 0.45

Tested by

no test coverage detected