Lines Matching +full:1 +full:eb
38 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_insert_list() local
55 spin_lock(&eb->eb_lock); in xfs_extent_busy_insert_list()
56 rbp = &eb->eb_tree.rb_node; in xfs_extent_busy_insert_list()
73 rb_insert_color(&new->rb_node, &eb->eb_tree); in xfs_extent_busy_insert_list()
77 spin_unlock(&eb->eb_lock); in xfs_extent_busy_insert_list()
106 * extent, -1 for an overlapping but not exact busy extent, and 1 for an exact
117 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_search() local
123 spin_lock(&eb->eb_lock); in xfs_extent_busy_search()
124 rbp = eb->eb_tree.rb_node; in xfs_extent_busy_search()
130 match = -1; in xfs_extent_busy_search()
135 match = -1; in xfs_extent_busy_search()
139 match = (busyp->length == len) ? 1 : -1; in xfs_extent_busy_search()
143 spin_unlock(&eb->eb_lock); in xfs_extent_busy_search()
165 __releases(&eb->eb_lock) in xfs_extent_busy_update_extent()
166 __acquires(&eb->eb_lock) in xfs_extent_busy_update_extent()
168 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_update_extent() local
179 spin_unlock(&eb->eb_lock); in xfs_extent_busy_update_extent()
180 delay(1); in xfs_extent_busy_update_extent()
181 spin_lock(&eb->eb_lock); in xfs_extent_busy_update_extent()
198 * Case 1: in xfs_extent_busy_update_extent()
254 rb_erase(&busyp->rb_node, &eb->eb_tree); in xfs_extent_busy_update_extent()
297 spin_unlock(&eb->eb_lock); in xfs_extent_busy_update_extent()
300 spin_lock(&eb->eb_lock); in xfs_extent_busy_update_extent()
314 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_reuse() local
318 spin_lock(&eb->eb_lock); in xfs_extent_busy_reuse()
320 rbp = eb->eb_tree.rb_node; in xfs_extent_busy_reuse()
339 spin_unlock(&eb->eb_lock); in xfs_extent_busy_reuse()
363 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_trim() local
371 spin_lock(&eb->eb_lock); in xfs_extent_busy_trim()
374 rbp = eb->eb_tree.rb_node; in xfs_extent_busy_trim()
394 * Case 1: in xfs_extent_busy_trim()
518 *busy_gen = eb->eb_gen; in xfs_extent_busy_trim()
521 spin_unlock(&eb->eb_lock); in xfs_extent_busy_trim()
537 struct xfs_extent_busy_tree *eb = busyp->group->xg_busy_extents; in xfs_extent_busy_clear_one() local
547 rb_erase(&busyp->rb_node, &eb->eb_tree); in xfs_extent_busy_clear_one()
574 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_clear() local
577 spin_lock(&eb->eb_lock); in xfs_extent_busy_clear()
587 eb->eb_gen++; in xfs_extent_busy_clear()
588 wake_up_all(&eb->eb_wait); in xfs_extent_busy_clear()
590 spin_unlock(&eb->eb_lock); in xfs_extent_busy_clear()
616 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_flush() local
629 if (busy_gen != READ_ONCE(eb->eb_gen)) in xfs_extent_busy_flush()
638 prepare_to_wait(&eb->eb_wait, &wait, TASK_KILLABLE); in xfs_extent_busy_flush()
639 if (busy_gen != READ_ONCE(eb->eb_gen)) in xfs_extent_busy_flush()
642 } while (1); in xfs_extent_busy_flush()
644 finish_wait(&eb->eb_wait, &wait); in xfs_extent_busy_flush()
653 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_wait_group() local
656 prepare_to_wait(&eb->eb_wait, &wait, TASK_KILLABLE); in xfs_extent_busy_wait_group()
657 if (RB_EMPTY_ROOT(&eb->eb_tree)) in xfs_extent_busy_wait_group()
660 } while (1); in xfs_extent_busy_wait_group()
661 finish_wait(&eb->eb_wait, &wait); in xfs_extent_busy_wait_group()
706 struct xfs_extent_busy_tree *eb = xg->xg_busy_extents; in xfs_extent_busy_list_empty() local
709 spin_lock(&eb->eb_lock); in xfs_extent_busy_list_empty()
710 res = RB_EMPTY_ROOT(&eb->eb_tree); in xfs_extent_busy_list_empty()
711 *busy_gen = READ_ONCE(eb->eb_gen); in xfs_extent_busy_list_empty()
712 spin_unlock(&eb->eb_lock); in xfs_extent_busy_list_empty()
719 struct xfs_extent_busy_tree *eb; in xfs_extent_busy_alloc() local
721 eb = kzalloc(sizeof(*eb), GFP_KERNEL); in xfs_extent_busy_alloc()
722 if (!eb) in xfs_extent_busy_alloc()
724 spin_lock_init(&eb->eb_lock); in xfs_extent_busy_alloc()
725 init_waitqueue_head(&eb->eb_wait); in xfs_extent_busy_alloc()
726 eb->eb_tree = RB_ROOT; in xfs_extent_busy_alloc()
727 return eb; in xfs_extent_busy_alloc()