Lines Matching refs:cel
2137 cache_celockstate_init(struct celockstate *cel) in cache_celockstate_init() argument
2140 bzero(cel, sizeof(*cel)); in cache_celockstate_init()
2144 cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, in cache_lock_vnodes_cel() argument
2149 MPASS(cel->vlp[0] == NULL); in cache_lock_vnodes_cel()
2150 MPASS(cel->vlp[1] == NULL); in cache_lock_vnodes_cel()
2151 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel()
2161 cel->vlp[0] = vlp1; in cache_lock_vnodes_cel()
2164 cel->vlp[1] = vlp2; in cache_lock_vnodes_cel()
2168 cache_unlock_vnodes_cel(struct celockstate *cel) in cache_unlock_vnodes_cel() argument
2171 MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); in cache_unlock_vnodes_cel()
2173 if (cel->vlp[0] != NULL) in cache_unlock_vnodes_cel()
2174 mtx_unlock(cel->vlp[0]); in cache_unlock_vnodes_cel()
2175 if (cel->vlp[1] != NULL) in cache_unlock_vnodes_cel()
2176 mtx_unlock(cel->vlp[1]); in cache_unlock_vnodes_cel()
2177 if (cel->vlp[2] != NULL) in cache_unlock_vnodes_cel()
2178 mtx_unlock(cel->vlp[2]); in cache_unlock_vnodes_cel()
2182 cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) in cache_lock_vnodes_cel_3() argument
2187 cache_assert_vlp_locked(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2188 cache_assert_vlp_locked(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2189 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel_3()
2195 if (vlp >= cel->vlp[1]) { in cache_lock_vnodes_cel_3()
2201 cache_unlock_vnodes_cel(cel); in cache_lock_vnodes_cel_3()
2202 if (vlp < cel->vlp[0]) { in cache_lock_vnodes_cel_3()
2204 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2205 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2207 if (cel->vlp[0] != NULL) in cache_lock_vnodes_cel_3()
2208 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2210 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2215 cel->vlp[2] = vlp; in cache_lock_vnodes_cel_3()
2220 cache_lock_buckets_cel(struct celockstate *cel, struct mtx *blp1, in cache_lock_buckets_cel() argument
2224 MPASS(cel->blp[0] == NULL); in cache_lock_buckets_cel()
2225 MPASS(cel->blp[1] == NULL); in cache_lock_buckets_cel()
2231 cel->blp[0] = blp1; in cache_lock_buckets_cel()
2234 cel->blp[1] = blp2; in cache_lock_buckets_cel()
2238 cache_unlock_buckets_cel(struct celockstate *cel) in cache_unlock_buckets_cel() argument
2241 if (cel->blp[0] != NULL) in cache_unlock_buckets_cel()
2242 mtx_unlock(cel->blp[0]); in cache_unlock_buckets_cel()
2243 mtx_unlock(cel->blp[1]); in cache_unlock_buckets_cel()
2257 cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock() argument
2267 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock()
2280 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock()
2289 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock()
2291 cache_unlock_vnodes_cel(cel); in cache_enter_lock()
2292 cel->vlp[0] = NULL; in cache_enter_lock()
2293 cel->vlp[1] = NULL; in cache_enter_lock()
2294 cel->vlp[2] = NULL; in cache_enter_lock()
2296 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock()
2300 cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock_dd() argument
2310 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock_dd()
2321 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock_dd()
2326 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock_dd()
2328 cache_unlock_vnodes_cel(cel); in cache_enter_lock_dd()
2329 cel->vlp[0] = NULL; in cache_enter_lock_dd()
2330 cel->vlp[1] = NULL; in cache_enter_lock_dd()
2331 cel->vlp[2] = NULL; in cache_enter_lock_dd()
2333 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock_dd()
2337 cache_enter_unlock(struct celockstate *cel) in cache_enter_unlock() argument
2340 cache_unlock_buckets_cel(cel); in cache_enter_unlock()
2341 cache_unlock_vnodes_cel(cel); in cache_enter_unlock()
2348 struct celockstate cel; in cache_enter_dotdot_prep() local
2356 cache_celockstate_init(&cel); in cache_enter_dotdot_prep()
2358 cache_enter_lock_dd(&cel, dvp, vp, hash); in cache_enter_dotdot_prep()
2367 cache_enter_unlock(&cel); in cache_enter_dotdot_prep()
2379 struct celockstate cel; in cache_enter_time() local
2425 cache_celockstate_init(&cel); in cache_enter_time()
2452 cache_enter_lock(&cel, dvp, vp, hash); in cache_enter_time()
2574 cache_enter_unlock(&cel); in cache_enter_time()
2579 cache_enter_unlock(&cel); in cache_enter_time()