client: touch dentries during path traversal

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-06-24 10:38:50 -07:00
parent 283da88513
commit 00fa99b9b6

View File

@ -3319,6 +3319,7 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
if (s->cap_ttl > now &&
s->cap_gen == dn->lease_gen) {
*target = dn->inode;
touch_dn(dn);
goto done;
}
ldout(cct, 20) << " bad lease, cap_ttl " << s->cap_ttl << ", cap_gen " << s->cap_gen
@ -3328,6 +3329,7 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target)
if (dir->caps_issued_mask(CEPH_CAP_FILE_SHARED) &&
dn->cap_shared_gen == dir->shared_gen) {
*target = dn->inode;
touch_dn(dn);
goto done;
}
} else { /*