v0.3
v0.4
-- fill_trace locking
- - revert 0772d6270c8a42b80323ecb2e43a844e28b7708a, then du during untar..
- - we hit "Uhhuh" case in real_lookup(). the problem is the race
- between lookup() adding a dentry and a subsequent revalidate always
- failing.
- -> solution? if htere is not dir ICONTENT or dentry lease, do not hash
- the dentry in fill_trace... ?
- - also, fill_trace should take dir->i_mutex... or not do the dentry update.
- fix msgr protocol wrt resets, and varying connection close policies
- ENOSPC
- finish client failure recovery (reconnect after long eviction; and slow delayed reconnect)
// adjust summation
assert(is_auth());
inode_t *pi = get_projected_inode();
+ bool touched_mtime = false;
dout(20) << " orig dirstat " << pi->dirstat << dendl;
for (map<frag_t,CDir*>::iterator p = dirfrags.begin();
p != dirfrags.end();
dout(20) << " fragstat " << pf->fragstat << dendl;
dout(20) << " accounted_fragstat " << pf->fragstat << dendl;
pi->dirstat.take_diff(pf->fragstat,
- pf->accounted_fragstat);
+ pf->accounted_fragstat, touched_mtime);
} else {
dout(20) << " frag " << p->first << " on " << *p->second << dendl;
dout(20) << " ignoring OLD accounted_fragstat " << pf->fragstat << dendl;
}
}
- pi->mtime = pi->ctime = pi->dirstat.mtime;
+ if (touched_mtime)
+ pi->mtime = pi->ctime = pi->dirstat.mtime;
pi->dirstat.version++;
dout(20) << " final dirstat " << pi->dirstat << dendl;
assert(pi->dirstat.size() >= 0);
pi->dirstat.version++;
dout(15) << "predirty_nested take_diff " << pf->fragstat << dendl;
dout(15) << "predirty_nested - " << pf->accounted_fragstat << dendl;
- pi->dirstat.take_diff(pf->fragstat, pf->accounted_fragstat);
- pi->mtime = pi->ctime = pi->dirstat.mtime;
+ bool touched_mtime = false;
+ pi->dirstat.take_diff(pf->fragstat, pf->accounted_fragstat, touched_mtime);
+ if (touched_mtime)
+ pi->mtime = pi->ctime = pi->dirstat.mtime;
dout(15) << "predirty_nested gives " << pi->dirstat << " on " << *pin << dendl;
// next parent!
void zero() {
memset(this, 0, sizeof(*this));
}
- void take_diff(const frag_info_t &cur, frag_info_t &acc) {
- if (cur.mtime > mtime)
+ void take_diff(const frag_info_t &cur, frag_info_t &acc, bool& touched_mtime) {
+ if (cur.mtime > mtime) {
rctime = mtime = cur.mtime;
+ touched_mtime = true;
+ }
nfiles += cur.nfiles - acc.nfiles;
nsubdirs += cur.nsubdirs - acc.nsubdirs;