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

Method fetch

src/mds/CInode.cc:1349–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1347};
1348
1349void CInode::fetch(MDSContext *fin)
1350{
1351 dout(10) << __func__ << dendl;
1352
1353 C_IO_Inode_Fetched *c = new C_IO_Inode_Fetched(this, fin);
1354 C_GatherBuilder gather(g_ceph_context, new C_OnFinisher(c, mdcache->mds->finisher));
1355
1356 object_t oid = CInode::get_object_name(ino(), frag_t(), "");
1357 object_locator_t oloc(mdcache->mds->get_metadata_pool());
1358
1359 // Old on-disk format: inode stored in xattr of a dirfrag
1360 ObjectOperation rd;
1361 rd.getxattr("inode", &c->bl, NULL);
1362 mdcache->mds->objecter->read(oid, oloc, rd, CEPH_NOSNAP, (bufferlist*)NULL, 0, gather.new_sub());
1363
1364 // Current on-disk format: inode stored in a .inode object
1365 object_t oid2 = CInode::get_object_name(ino(), frag_t(), ".inode");
1366 mdcache->mds->objecter->read(oid2, oloc, 0, 0, CEPH_NOSNAP, &c->bl2, 0, gather.new_sub());
1367
1368 gather.activate();
1369}
1370
1371void CInode::_fetched(bufferlist& bl, bufferlist& bl2, Context *fin)
1372{

Callers 1

Calls 7

get_object_nameFunction · 0.85
frag_tClass · 0.85
get_metadata_poolMethod · 0.45
getxattrMethod · 0.45
readMethod · 0.45
new_subMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected