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

Method handle_cap_trunc

src/client/Client.cc:5828–5843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5826}
5827
5828void Client::handle_cap_trunc(MetaSession *session, Inode *in, const MConstRef<MClientCaps>& m)
5829{
5830 mds_rank_t mds = session->mds_num;
5831 ceph_assert(in->caps.count(mds));
5832
5833 uint64_t size = m->effective_size();
5834 ldout(cct, 10) << __func__ << " on ino " << *in
5835 << " size " << in->effective_size() << " -> " << size
5836 << dendl;
5837
5838 int issued;
5839 in->caps_issued(&issued);
5840 issued |= in->caps_dirty();
5841 update_inode_file_size(in, issued, size, m->get_truncate_seq(),
5842 m->get_truncate_size());
5843}
5844
5845void Client::handle_cap_flush_ack(MetaSession *session, Inode *in, Cap *cap, const MConstRef<MClientCaps>& m)
5846{

Callers

nothing calls this directly

Calls 6

caps_issuedMethod · 0.80
caps_dirtyMethod · 0.80
get_truncate_seqMethod · 0.80
get_truncate_sizeMethod · 0.80
countMethod · 0.45
effective_sizeMethod · 0.45

Tested by

no test coverage detected