MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cache_neg_promote_locked

Function cache_neg_promote_locked

freebsd/kern/vfs_cache.c:1138–1153  ·  view source on GitHub ↗

* Move a negative entry to the hot list. */

Source from the content-addressed store, hash-verified

1136 * Move a negative entry to the hot list.
1137 */
1138static void
1139cache_neg_promote_locked(struct namecache *ncp)
1140{
1141 struct neglist *nl;
1142 struct negstate *ns;
1143
1144 ns = NCP2NEGSTATE(ncp);
1145 nl = NCP2NEGLIST(ncp);
1146 mtx_assert(&nl->nl_lock, MA_OWNED);
1147 if ((ns->neg_flag & NEG_HOT) == 0) {
1148 TAILQ_REMOVE(&nl->nl_list, ncp, nc_dst);
1149 TAILQ_INSERT_TAIL(&nl->nl_hotlist, ncp, nc_dst);
1150 nl->nl_hotnum++;
1151 ns->neg_flag |= NEG_HOT;
1152 }
1153}
1154
1155/*
1156 * Move a hot negative entry to the cold list.

Callers 2

cache_neg_promote_condFunction · 0.85
cache_neg_promoteFunction · 0.85

Calls 3

NCP2NEGSTATEFunction · 0.85
NCP2NEGLISTFunction · 0.85
mtx_assertFunction · 0.85

Tested by

no test coverage detected