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

Method store

src/mds/CInode.cc:1261–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261void CInode::store(MDSContext *fin)
1262{
1263 dout(10) << __func__ << " " << get_version() << dendl;
1264 ceph_assert(is_base());
1265
1266 if (snaprealm)
1267 purge_stale_snap_data(snaprealm->get_snaps());
1268
1269 // encode
1270 bufferlist bl;
1271 string magic = CEPH_FS_ONDISK_MAGIC;
1272 using ceph::encode;
1273 encode(magic, bl);
1274 encode_store(bl, mdcache->mds->mdsmap->get_up_features());
1275
1276 // write it.
1277 SnapContext snapc;
1278 ObjectOperation m;
1279 m.write_full(bl);
1280
1281 object_t oid = CInode::get_object_name(ino(), frag_t(), ".inode");
1282 object_locator_t oloc(mdcache->mds->get_metadata_pool());
1283
1284 Context *newfin =
1285 new C_OnFinisher(new C_IO_Inode_Stored(this, get_version(), fin),
1286 mdcache->mds->finisher);
1287 mdcache->mds->objecter->mutate(oid, oloc, m, snapc,
1288 ceph::real_clock::now(), 0,
1289 newfin);
1290}
1291
1292void CInode::_stored(int r, version_t v, Context *fin)
1293{

Callers 15

_aio_threadMethod · 0.45
_sync_writeMethod · 0.45
_measure_static_fragMethod · 0.45
callMethod · 0.45
try_to_expireMethod · 0.45
ssl_reloadMethod · 0.45
get_gcm_accelMethod · 0.45
resetMethod · 0.45

Calls 9

get_object_nameFunction · 0.85
frag_tClass · 0.85
get_up_featuresMethod · 0.80
encodeFunction · 0.70
nowFunction · 0.50
get_snapsMethod · 0.45
write_fullMethod · 0.45
get_metadata_poolMethod · 0.45
mutateMethod · 0.45

Tested by

no test coverage detected