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

Method do_write

src/client/Client.cc:12635–12656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12633}
12634
12635int Client::WriteEncMgr_Buffered::do_write()
12636{
12637 ldout(cct, 10) << __func__ << dendl;
12638 int r = 0;
12639
12640 // do buffered write
12641 if (!in->oset.dirty_or_tx)
12642 clnt->get_cap_ref(in, CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_BUFFER);
12643
12644 clnt->get_cap_ref(in, CEPH_CAP_FILE_BUFFER);
12645
12646 // async, caching, non-blocking.
12647 r = clnt->objectcacher->file_write(&in->oset, &in->layout,
12648 in->snaprealm->get_snap_context(),
12649 offset, size, *pbl, ceph::real_clock::now(),
12650 0, iofinish,
12651 !async
12652 ? clnt->objectcacher->CFG_block_writes_upfront()
12653 : false);
12654
12655 return r;
12656}
12657
12658int Client::WriteEncMgr_NotBuffered::do_write()
12659{

Callers

nothing calls this directly

Calls 6

file_writeMethod · 0.80
nowFunction · 0.50
get_cap_refMethod · 0.45
get_snap_contextMethod · 0.45
write_truncMethod · 0.45

Tested by

no test coverage detected