Lines Matching refs:cel
2042 cache_celockstate_init(struct celockstate *cel) in cache_celockstate_init() argument
2045 bzero(cel, sizeof(*cel)); in cache_celockstate_init()
2049 cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, in cache_lock_vnodes_cel() argument
2054 MPASS(cel->vlp[0] == NULL); in cache_lock_vnodes_cel()
2055 MPASS(cel->vlp[1] == NULL); in cache_lock_vnodes_cel()
2056 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel()
2066 cel->vlp[0] = vlp1; in cache_lock_vnodes_cel()
2069 cel->vlp[1] = vlp2; in cache_lock_vnodes_cel()
2073 cache_unlock_vnodes_cel(struct celockstate *cel) in cache_unlock_vnodes_cel() argument
2076 MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); in cache_unlock_vnodes_cel()
2078 if (cel->vlp[0] != NULL) in cache_unlock_vnodes_cel()
2079 mtx_unlock(cel->vlp[0]); in cache_unlock_vnodes_cel()
2080 if (cel->vlp[1] != NULL) in cache_unlock_vnodes_cel()
2081 mtx_unlock(cel->vlp[1]); in cache_unlock_vnodes_cel()
2082 if (cel->vlp[2] != NULL) in cache_unlock_vnodes_cel()
2083 mtx_unlock(cel->vlp[2]); in cache_unlock_vnodes_cel()
2087 cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) in cache_lock_vnodes_cel_3() argument
2092 cache_assert_vlp_locked(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2093 cache_assert_vlp_locked(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2094 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel_3()
2100 if (vlp >= cel->vlp[1]) { in cache_lock_vnodes_cel_3()
2106 cache_unlock_vnodes_cel(cel); in cache_lock_vnodes_cel_3()
2107 if (vlp < cel->vlp[0]) { in cache_lock_vnodes_cel_3()
2109 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2110 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2112 if (cel->vlp[0] != NULL) in cache_lock_vnodes_cel_3()
2113 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
2115 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
2120 cel->vlp[2] = vlp; in cache_lock_vnodes_cel_3()
2125 cache_lock_buckets_cel(struct celockstate *cel, struct mtx *blp1, in cache_lock_buckets_cel() argument
2129 MPASS(cel->blp[0] == NULL); in cache_lock_buckets_cel()
2130 MPASS(cel->blp[1] == NULL); in cache_lock_buckets_cel()
2136 cel->blp[0] = blp1; in cache_lock_buckets_cel()
2139 cel->blp[1] = blp2; in cache_lock_buckets_cel()
2143 cache_unlock_buckets_cel(struct celockstate *cel) in cache_unlock_buckets_cel() argument
2146 if (cel->blp[0] != NULL) in cache_unlock_buckets_cel()
2147 mtx_unlock(cel->blp[0]); in cache_unlock_buckets_cel()
2148 mtx_unlock(cel->blp[1]); in cache_unlock_buckets_cel()
2162 cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock() argument
2172 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock()
2185 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock()
2194 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock()
2196 cache_unlock_vnodes_cel(cel); in cache_enter_lock()
2197 cel->vlp[0] = NULL; in cache_enter_lock()
2198 cel->vlp[1] = NULL; in cache_enter_lock()
2199 cel->vlp[2] = NULL; in cache_enter_lock()
2201 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock()
2205 cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock_dd() argument
2215 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock_dd()
2226 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock_dd()
2231 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock_dd()
2233 cache_unlock_vnodes_cel(cel); in cache_enter_lock_dd()
2234 cel->vlp[0] = NULL; in cache_enter_lock_dd()
2235 cel->vlp[1] = NULL; in cache_enter_lock_dd()
2236 cel->vlp[2] = NULL; in cache_enter_lock_dd()
2238 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock_dd()
2242 cache_enter_unlock(struct celockstate *cel) in cache_enter_unlock() argument
2245 cache_unlock_buckets_cel(cel); in cache_enter_unlock()
2246 cache_unlock_vnodes_cel(cel); in cache_enter_unlock()
2253 struct celockstate cel; in cache_enter_dotdot_prep() local
2261 cache_celockstate_init(&cel); in cache_enter_dotdot_prep()
2263 cache_enter_lock_dd(&cel, dvp, vp, hash); in cache_enter_dotdot_prep()
2272 cache_enter_unlock(&cel); in cache_enter_dotdot_prep()
2284 struct celockstate cel; in cache_enter_time() local
2322 cache_celockstate_init(&cel); in cache_enter_time()
2349 cache_enter_lock(&cel, dvp, vp, hash); in cache_enter_time()
2471 cache_enter_unlock(&cel); in cache_enter_time()
2476 cache_enter_unlock(&cel); in cache_enter_time()