Lines Matching refs:cel

1418 cache_celockstate_init(struct celockstate *cel)  in cache_celockstate_init()  argument
1421 bzero(cel, sizeof(*cel)); in cache_celockstate_init()
1425 cache_lock_vnodes_cel(struct celockstate *cel, struct vnode *vp, in cache_lock_vnodes_cel() argument
1430 MPASS(cel->vlp[0] == NULL); in cache_lock_vnodes_cel()
1431 MPASS(cel->vlp[1] == NULL); in cache_lock_vnodes_cel()
1432 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel()
1442 cel->vlp[0] = vlp1; in cache_lock_vnodes_cel()
1445 cel->vlp[1] = vlp2; in cache_lock_vnodes_cel()
1449 cache_unlock_vnodes_cel(struct celockstate *cel) in cache_unlock_vnodes_cel() argument
1452 MPASS(cel->vlp[0] != NULL || cel->vlp[1] != NULL); in cache_unlock_vnodes_cel()
1454 if (cel->vlp[0] != NULL) in cache_unlock_vnodes_cel()
1455 mtx_unlock(cel->vlp[0]); in cache_unlock_vnodes_cel()
1456 if (cel->vlp[1] != NULL) in cache_unlock_vnodes_cel()
1457 mtx_unlock(cel->vlp[1]); in cache_unlock_vnodes_cel()
1458 if (cel->vlp[2] != NULL) in cache_unlock_vnodes_cel()
1459 mtx_unlock(cel->vlp[2]); in cache_unlock_vnodes_cel()
1463 cache_lock_vnodes_cel_3(struct celockstate *cel, struct vnode *vp) in cache_lock_vnodes_cel_3() argument
1468 cache_assert_vlp_locked(cel->vlp[0]); in cache_lock_vnodes_cel_3()
1469 cache_assert_vlp_locked(cel->vlp[1]); in cache_lock_vnodes_cel_3()
1470 MPASS(cel->vlp[2] == NULL); in cache_lock_vnodes_cel_3()
1476 if (vlp >= cel->vlp[1]) { in cache_lock_vnodes_cel_3()
1482 cache_unlock_vnodes_cel(cel); in cache_lock_vnodes_cel_3()
1483 if (vlp < cel->vlp[0]) { in cache_lock_vnodes_cel_3()
1485 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
1486 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
1488 if (cel->vlp[0] != NULL) in cache_lock_vnodes_cel_3()
1489 mtx_lock(cel->vlp[0]); in cache_lock_vnodes_cel_3()
1491 mtx_lock(cel->vlp[1]); in cache_lock_vnodes_cel_3()
1496 cel->vlp[2] = vlp; in cache_lock_vnodes_cel_3()
1501 cache_lock_buckets_cel(struct celockstate *cel, struct rwlock *blp1, in cache_lock_buckets_cel() argument
1505 MPASS(cel->blp[0] == NULL); in cache_lock_buckets_cel()
1506 MPASS(cel->blp[1] == NULL); in cache_lock_buckets_cel()
1512 cel->blp[0] = blp1; in cache_lock_buckets_cel()
1515 cel->blp[1] = blp2; in cache_lock_buckets_cel()
1519 cache_unlock_buckets_cel(struct celockstate *cel) in cache_unlock_buckets_cel() argument
1522 if (cel->blp[0] != NULL) in cache_unlock_buckets_cel()
1523 rw_wunlock(cel->blp[0]); in cache_unlock_buckets_cel()
1524 rw_wunlock(cel->blp[1]); in cache_unlock_buckets_cel()
1539 cache_enter_lock(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock() argument
1548 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock()
1560 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock()
1569 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock()
1571 cache_unlock_vnodes_cel(cel); in cache_enter_lock()
1572 cel->vlp[0] = NULL; in cache_enter_lock()
1573 cel->vlp[1] = NULL; in cache_enter_lock()
1574 cel->vlp[2] = NULL; in cache_enter_lock()
1576 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock()
1580 cache_enter_lock_dd(struct celockstate *cel, struct vnode *dvp, struct vnode *vp, in cache_enter_lock_dd() argument
1589 cache_lock_vnodes_cel(cel, dvp, vp); in cache_enter_lock_dd()
1599 if (cache_lock_vnodes_cel_3(cel, ncp->nc_vp)) in cache_enter_lock_dd()
1604 VP2VNODELOCK(ncp->nc_vp) == cel->vlp[2]) in cache_enter_lock_dd()
1606 cache_unlock_vnodes_cel(cel); in cache_enter_lock_dd()
1607 cel->vlp[0] = NULL; in cache_enter_lock_dd()
1608 cel->vlp[1] = NULL; in cache_enter_lock_dd()
1609 cel->vlp[2] = NULL; in cache_enter_lock_dd()
1611 cache_lock_buckets_cel(cel, blps[0], blps[1]); in cache_enter_lock_dd()
1615 cache_enter_unlock(struct celockstate *cel) in cache_enter_unlock() argument
1618 cache_unlock_buckets_cel(cel); in cache_enter_unlock()
1619 cache_unlock_vnodes_cel(cel); in cache_enter_unlock()
1629 struct celockstate cel; in cache_enter_time() local
1655 cache_celockstate_init(&cel); in cache_enter_time()
1665 cache_enter_lock_dd(&cel, dvp, vp, hash); in cache_enter_time()
1702 cache_enter_unlock(&cel); in cache_enter_time()
1706 cache_enter_unlock(&cel); in cache_enter_time()
1707 cache_celockstate_init(&cel); in cache_enter_time()
1736 cache_enter_lock(&cel, dvp, vp, hash); in cache_enter_time()
1830 cache_enter_unlock(&cel); in cache_enter_time()
1837 cache_enter_unlock(&cel); in cache_enter_time()