/* Positive dentry: reject if error or not the same inode. */ if (inode) { if (err) {
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d lookup failure.\n",
__FILE__, __func__, __LINE__); goto out_drop;
} if (!match_handle(new_op->downcall.resp.lookup.refn.khandle,
inode)) {
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d no match.\n",
__FILE__, __func__, __LINE__); goto out_drop;
}
/* Negative dentry: reject if success or error other than ENOENT. */
} else {
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: negative dentry.\n",
__func__); if (!err || err != -ENOENT) { if (new_op->downcall.status != 0)
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d lookup failure.\n",
__FILE__, __func__, __LINE__); goto out_drop;
}
}
/* * Verify that dentry is valid. * * Should return 1 if dentry can still be trusted, else 0.
*/ staticint orangefs_d_revalidate(struct inode *dir, conststruct qstr *name, struct dentry *dentry, unsignedint flags)
{ int ret; unsignedlong time = (unsignedlong) dentry->d_fsdata;
if (time_before(jiffies, time)) return 1;
if (flags & LOOKUP_RCU) return -ECHILD;
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: called on dentry %p.\n",
__func__, dentry);
/* * If this passes, the positive dentry still exists or the negative * dentry still does not exist.
*/ if (!orangefs_revalidate_lookup(dir, name, dentry)) return 0;
/* We do not need to continue with negative dentries. */ if (!dentry->d_inode) {
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: negative dentry or positive dentry and inode valid.\n",
__func__); return 1;
}
/* Now we must perform a getattr to validate the inode contents. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.