The dentry needs a [first,last] range and we don't know what first is when
we miss a lookup. And part of the point of instantiating null dentires is
to issue leases against them, which we don't do. The client will cache
the null result.
if (dn) {
dout(20) << " had null " << *dn << dendl;
assert(dnl->is_null());
- } else if (!curdir->is_frozen()) {
+ } else if (curdir->is_frozen()) {
+ dout(20) << " not adding null to frozen dir " << dendl;
+ } else if (snapid < CEPH_MAXSNAP) {
+ dout(20) << " not adding null for snapid " << snapid << dendl;
+ } else {
// create a null dentry
dn = curdir->add_null_dentry(path[depth]);
dout(20) << " added null " << *dn << dendl;
- } else {
- dout(20) << " not adding null to frozen dir " << dendl;
}
if (dn)
pdnvec->push_back(dn);