Lines Matching refs:cel

2248 cache_celockstate_init(struct celockstate *cel)  in cache_celockstate_init()  argument
2251 bzero(cel, sizeof(*cel)); in cache_celockstate_init()
2255 cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, in cache_lock_vnodes_cel() argument
2260 MPASS(cel->vlp[0] == NULL); in cache_lock_vnodes_cel()
2261 MPASS(cel->vlp[1] == NULL); in cache_lock_vnodes_cel()
2262 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel()
2272 cel->vlp[0] = vlp1; in cache_lock_vnodes_cel()
2275 cel->vlp[1] = vlp2; in cache_lock_vnodes_cel()
2279 cache_unlock_vnodes_cel(struct celockstate *cel) in cache_unlock_vnodes_cel() argument
2282 MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); in cache_unlock_vnodes_cel()
2284 if (cel->vlp[0] != NULL) in cache_unlock_vnodes_cel()
2285 mtx_unlock(cel->vlp[0]); in cache_unlock_vnodes_cel()
2286 if (cel->vlp[1] != NULL) in cache_unlock_vnodes_cel()
2287 mtx_unlock(cel->vlp[1]); in cache_unlock_vnodes_cel()
2288 if (cel->vlp[2] != NULL) in cache_unlock_vnodes_cel()
2289 mtx_unlock(cel->vlp[2]); in cache_unlock_vnodes_cel()
2293 cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) in cache_lock_vnodes_cel_3() argument
2298 cache_assert_vlp_locked(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2299 cache_assert_vlp_locked(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2300 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel_3()
2306 if (vlp >= cel->vlp[1]) { in cache_lock_vnodes_cel_3()
2311 cache_unlock_vnodes_cel(cel); in cache_lock_vnodes_cel_3()
2313 if (vlp < cel->vlp[0]) { in cache_lock_vnodes_cel_3()
2315 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2316 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2318 if (cel->vlp[0] != NULL) in cache_lock_vnodes_cel_3()
2319 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2321 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2326 cel->vlp[2] = vlp; in cache_lock_vnodes_cel_3()
2331 cache_lock_buckets_cel(struct celockstate *cel, struct mtx *blp1, in cache_lock_buckets_cel() argument
2335 MPASS(cel->blp[0] == NULL); in cache_lock_buckets_cel()
2336 MPASS(cel->blp[1] == NULL); in cache_lock_buckets_cel()
2342 cel->blp[0] = blp1; in cache_lock_buckets_cel()
2345 cel->blp[1] = blp2; in cache_lock_buckets_cel()
2349 cache_unlock_buckets_cel(struct celockstate *cel) in cache_unlock_buckets_cel() argument
2352 if (cel->blp[0] != NULL) in cache_unlock_buckets_cel()
2353 mtx_unlock(cel->blp[0]); in cache_unlock_buckets_cel()
2354 mtx_unlock(cel->blp[1]); in cache_unlock_buckets_cel()
2368 cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock() argument
2378 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock()
2391 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock()
2400 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock()
2402 cache_unlock_vnodes_cel(cel); in cache_enter_lock()
2403 cel->vlp[0] = NULL; in cache_enter_lock()
2404 cel->vlp[1] = NULL; in cache_enter_lock()
2405 cel->vlp[2] = NULL; in cache_enter_lock()
2407 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock()
2411 cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock_dd() argument
2421 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock_dd()
2432 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock_dd()
2437 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock_dd()
2439 cache_unlock_vnodes_cel(cel); in cache_enter_lock_dd()
2440 cel->vlp[0] = NULL; in cache_enter_lock_dd()
2441 cel->vlp[1] = NULL; in cache_enter_lock_dd()
2442 cel->vlp[2] = NULL; in cache_enter_lock_dd()
2444 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock_dd()
2448 cache_enter_unlock(struct celockstate *cel) in cache_enter_unlock() argument
2451 cache_unlock_buckets_cel(cel); in cache_enter_unlock()
2452 cache_unlock_vnodes_cel(cel); in cache_enter_unlock()
2459 struct celockstate cel; in cache_enter_dotdot_prep() local
2467 cache_celockstate_init(&cel); in cache_enter_dotdot_prep()
2469 cache_enter_lock_dd(&cel, dvp, vp, hash); in cache_enter_dotdot_prep()
2478 cache_enter_unlock(&cel); in cache_enter_dotdot_prep()
2490 struct celockstate cel; in cache_enter_time() local
2536 cache_celockstate_init(&cel); in cache_enter_time()
2563 cache_enter_lock(&cel, dvp, vp, hash); in cache_enter_time()
2685 cache_enter_unlock(&cel); in cache_enter_time()
2690 cache_enter_unlock(&cel); in cache_enter_time()