Add on fetch or import of dirty_rstat; clear on export of dirty_rstat.
void CDentry::push_projected_linkage(CInode *inode)
{
+ // dirty rstat tracking is in the projected plane
+ bool dirty_rstat = inode->is_dirty_rstat();
+ if (dirty_rstat)
+ inode->clear_dirty_rstat();
+
_project_linkage()->inode = inode;
inode->push_projected_parent(this);
+
+ if (dirty_rstat)
+ inode->mark_dirty_rstat();
}
CDentry::linkage_t *CDentry::pop_projected_linkage()
dn = add_primary_dentry(dname, in, first, last);
dout(12) << "_fetched got " << *dn << " " << *in << dendl;
+ if (in->inode.is_dirty_rstat())
+ in->mark_dirty_rstat();
+
//in->hack_accessed = false;
//in->hack_load_stamp = g_clock.now();
//num_new_inodes_loaded++;
in->state_clear(CInode::STATE_AUTH);
in->replica_nonce = CInode::EXPORT_NONCE;
+ in->clear_dirty_rstat();
+
// waiters
in->take_waiting(CInode::WAIT_ANY_MASK, finished);
} else {
dout(10) << " had " << *in << dendl;
}
+
+ if (in->inode.is_dirty_rstat())
+ in->mark_dirty_rstat();
// clear if dirtyscattered, since we're going to journal this
// but not until we _actually_ finish the import...
return layout.fl_object_size * layout.fl_stripe_count;
}
+ bool is_dirty_rstat() const { return !(rstat == accounted_rstat); }
+
uint64_t get_max_size() const {
uint64_t max = 0;
for (map<client_t,client_writeable_range_t>::const_iterator p = client_ranges.begin();