Lines Matching refs:cel
2161 cache_celockstate_init(struct celockstate *cel) in cache_celockstate_init() argument
2164 bzero(cel, sizeof(*cel)); in cache_celockstate_init()
2168 cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, in cache_lock_vnodes_cel() argument
2173 MPASS(cel->vlp[0] == NULL); in cache_lock_vnodes_cel()
2174 MPASS(cel->vlp[1] == NULL); in cache_lock_vnodes_cel()
2175 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel()
2185 cel->vlp[0] = vlp1; in cache_lock_vnodes_cel()
2188 cel->vlp[1] = vlp2; in cache_lock_vnodes_cel()
2192 cache_unlock_vnodes_cel(struct celockstate *cel) in cache_unlock_vnodes_cel() argument
2195 MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); in cache_unlock_vnodes_cel()
2197 if (cel->vlp[0] != NULL) in cache_unlock_vnodes_cel()
2198 mtx_unlock(cel->vlp[0]); in cache_unlock_vnodes_cel()
2199 if (cel->vlp[1] != NULL) in cache_unlock_vnodes_cel()
2200 mtx_unlock(cel->vlp[1]); in cache_unlock_vnodes_cel()
2201 if (cel->vlp[2] != NULL) in cache_unlock_vnodes_cel()
2202 mtx_unlock(cel->vlp[2]); in cache_unlock_vnodes_cel()
2206 cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) in cache_lock_vnodes_cel_3() argument
2211 cache_assert_vlp_locked(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2212 cache_assert_vlp_locked(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2213 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel_3()
2219 if (vlp >= cel->vlp[1]) { in cache_lock_vnodes_cel_3()
2224 cache_unlock_vnodes_cel(cel); in cache_lock_vnodes_cel_3()
2226 if (vlp < cel->vlp[0]) { in cache_lock_vnodes_cel_3()
2228 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2229 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2231 if (cel->vlp[0] != NULL) in cache_lock_vnodes_cel_3()
2232 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2234 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2239 cel->vlp[2] = vlp; in cache_lock_vnodes_cel_3()
2244 cache_lock_buckets_cel(struct celockstate *cel, struct mtx *blp1, in cache_lock_buckets_cel() argument
2248 MPASS(cel->blp[0] == NULL); in cache_lock_buckets_cel()
2249 MPASS(cel->blp[1] == NULL); in cache_lock_buckets_cel()
2255 cel->blp[0] = blp1; in cache_lock_buckets_cel()
2258 cel->blp[1] = blp2; in cache_lock_buckets_cel()
2262 cache_unlock_buckets_cel(struct celockstate *cel) in cache_unlock_buckets_cel() argument
2265 if (cel->blp[0] != NULL) in cache_unlock_buckets_cel()
2266 mtx_unlock(cel->blp[0]); in cache_unlock_buckets_cel()
2267 mtx_unlock(cel->blp[1]); in cache_unlock_buckets_cel()
2281 cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock() argument
2291 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock()
2304 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock()
2313 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock()
2315 cache_unlock_vnodes_cel(cel); in cache_enter_lock()
2316 cel->vlp[0] = NULL; in cache_enter_lock()
2317 cel->vlp[1] = NULL; in cache_enter_lock()
2318 cel->vlp[2] = NULL; in cache_enter_lock()
2320 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock()
2324 cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock_dd() argument
2334 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock_dd()
2345 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock_dd()
2350 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock_dd()
2352 cache_unlock_vnodes_cel(cel); in cache_enter_lock_dd()
2353 cel->vlp[0] = NULL; in cache_enter_lock_dd()
2354 cel->vlp[1] = NULL; in cache_enter_lock_dd()
2355 cel->vlp[2] = NULL; in cache_enter_lock_dd()
2357 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock_dd()
2361 cache_enter_unlock(struct celockstate *cel) in cache_enter_unlock() argument
2364 cache_unlock_buckets_cel(cel); in cache_enter_unlock()
2365 cache_unlock_vnodes_cel(cel); in cache_enter_unlock()
2372 struct celockstate cel; in cache_enter_dotdot_prep() local
2380 cache_celockstate_init(&cel); in cache_enter_dotdot_prep()
2382 cache_enter_lock_dd(&cel, dvp, vp, hash); in cache_enter_dotdot_prep()
2391 cache_enter_unlock(&cel); in cache_enter_dotdot_prep()
2403 struct celockstate cel; in cache_enter_time() local
2449 cache_celockstate_init(&cel); in cache_enter_time()
2476 cache_enter_lock(&cel, dvp, vp, hash); in cache_enter_time()
2598 cache_enter_unlock(&cel); in cache_enter_time()
2603 cache_enter_unlock(&cel); in cache_enter_time()