checks common to add_update_cap, handle_cap_grant
| 4716 | |
| 4717 | // checks common to add_update_cap, handle_cap_grant |
| 4718 | void 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 | |
| 4735 | void Client::add_update_cap(Inode *in, MetaSession *mds_session, uint64_t cap_id, |
| 4736 | unsigned issued, unsigned wanted, unsigned seq, unsigned mseq, |
nothing calls this directly
no test coverage detected