inode = front.inode;
if (inode.is_backtrace_updated())
- _mark_dirty_parent(ls, old_pool != inode.layout.pool_id);
+ mark_dirty_parent(ls, old_pool != inode.layout.pool_id);
if (front.xattrs) {
--num_projected_xattrs;
mdcache->fetch_backtrace(inode.ino, get_backtrace_pool(), *backtrace, fin);
}
-void CInode::_mark_dirty_parent(LogSegment *ls, bool dirty_pool)
+void CInode::mark_dirty_parent(LogSegment *ls, bool dirty_pool)
{
if (!state_test(STATE_DIRTYPARENT)) {
dout(10) << __func__ << dendl;
mds->clog->error() << "bad backtrace on directory inode " << ino();
assert(!"bad backtrace" == (g_conf->mds_verify_backtrace > 1));
- _mark_dirty_parent(mds->mdlog->get_current_segment(), false);
+ mark_dirty_parent(mds->mdlog->get_current_segment(), false);
mds->mdlog->flush();
}
}
}
if (is_dirty_parent()) {
get(PIN_DIRTYPARENT);
- _mark_dirty_parent(ls);
+ mark_dirty_parent(ls);
}
decode(pop, ceph_clock_now(), p);
in->make_path_string(path);
in->mdcache->mds->clog->warn() << "bad backtrace on inode " << in->ino()
<< "(" << path << "), rewriting it";
- in->_mark_dirty_parent(in->mdcache->mds->mdlog->get_current_segment(),
+ in->mark_dirty_parent(in->mdcache->mds->mdlog->get_current_segment(),
false);
// Flag that we repaired this BT so that it won't go into damagetable
results->backtrace.repaired = true;
*/
int64_t get_backtrace_pool() const;
public:
- void _mark_dirty_parent(LogSegment *ls, bool dirty_pool=false);
+ void mark_dirty_parent(LogSegment *ls, bool dirty_pool=false);
void clear_dirty_parent();
void verify_diri_backtrace(bufferlist &bl, int err);
bool is_dirty_parent() { return state_test(STATE_DIRTYPARENT); }
rootdir->mark_dirty(rootdir->pre_dirty(), mds->mdlog->get_current_segment());
rootdir->commit(0, gather->new_sub());
- root->store(gather->new_sub());
+ root->mark_clean();
+ root->mark_dirty(root->pre_dirty(), mds->mdlog->get_current_segment());
+ root->mark_dirty_parent(mds->mdlog->get_current_segment(), true);
+ root->flush(gather->new_sub());
}
void MDCache::create_mydir_hierarchy(MDSGather *gather)
straydir->mark_complete();
straydir->mark_dirty(straydir->pre_dirty(), ls);
straydir->commit(0, gather->new_sub());
- stray->_mark_dirty_parent(ls, true);
+ stray->mark_dirty_parent(ls, true);
stray->store_backtrace(gather->new_sub());
}
// dirty inode, dn, dir
newi->inode.version--; // a bit hacky, see C_MDS_mknod_finish
newi->mark_dirty(newi->inode.version+1, mdr->ls);
- newi->_mark_dirty_parent(mdr->ls, true);
+ newi->mark_dirty_parent(mdr->ls, true);
mdr->apply();
// a new version of hte inode since it's just been created)
newi->inode.version--;
newi->mark_dirty(newi->inode.version + 1, mdr->ls);
- newi->_mark_dirty_parent(mdr->ls, true);
+ newi->mark_dirty_parent(mdr->ls, true);
// mkdir?
if (newi->inode.is_dir()) {
if (p->is_dirty())
in->_mark_dirty(logseg);
if (p->is_dirty_parent())
- in->_mark_dirty_parent(logseg, p->is_dirty_pool());
+ in->mark_dirty_parent(logseg, p->is_dirty_pool());
if (p->need_snapflush())
logseg->open_files.push_back(&in->item_open_file);
if (dn->is_auth())