void CInode::decode_import(bufferlist::iterator& p,
LogSegment *ls)
{
- utime_t old_mtime = inode.mtime;
bool was_anchored = inode.anchored;
::decode(inode, p);
if (parent && was_anchored != inode.anchored)
parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
- if (old_mtime > inode.mtime) {
- assert(dirlock.is_updated());
- inode.mtime = old_mtime; // preserve our mtime, if it is larger
- }
::decode(symlink, p);
::decode(dirfragtree, p);
// anchor transactions included in this update.
list<version_t> atids;
- // inode dirlocks (scatterlocks) i've touched.
- //map<inodeno_t, utime_t> dirty_inode_mtimes;
-
// ino's i've allocated
list<inodeno_t> allocated_inos;
version_t alloc_tablev;
::encode(lump_order, bl);
::encode(lump_map, bl);
::encode(atids, bl);
- //::encode(dirty_inode_mtimes, bl);
::encode(allocated_inos, bl);
if (!allocated_inos.empty())
::encode(alloc_tablev, bl);
::decode(lump_order, bl);
::decode(lump_map, bl);
::decode(atids, bl);
- //::decode(dirty_inode_mtimes, bl);
::decode(allocated_inos, bl);
if (!allocated_inos.empty())
::decode(alloc_tablev, bl);
atids.push_back(atid);
}
- /*
- void add_dirtied_inode_mtime(inodeno_t ino, utime_t ctime) {
- dirty_inode_mtimes[ino] = ctime;
- }
- */
-
void add_allocated_ino(inodeno_t ino, version_t tablev) {
allocated_inos.push_back(ino);
alloc_tablev = tablev;
mds->anchorclient->got_journaled_agree(*p, logseg);
}
- /*// dirtied inode mtimes
- if (!dirty_inode_mtimes.empty())
- for (map<inodeno_t,utime_t>::iterator p = dirty_inode_mtimes.begin();
- p != dirty_inode_mtimes.end();
- ++p) {
- CInode *in = mds->mdcache->get_inode(p->first);
- dout(10) << "EMetaBlob.replay setting dirlock updated flag on " << *in << dendl;
- in->dirlock.set_updated();
- logseg->dirty_inode_mtimes.push_back(&in->xlist_dirty_inode_mtime);
- }
- */
-
// allocated_inos
if (!allocated_inos.empty()) {
if (mds->idalloc->get_version() >= alloc_tablev) {