• Home
  • Raw
  • Download

Lines Matching refs:bp

168 static void rb_free_extent(struct ext2fs_rb_private *bp,  in rb_free_extent()  argument
171 if (bp->wcursor == ext) in rb_free_extent()
172 bp->wcursor = NULL; in rb_free_extent()
173 if (bp->rcursor == ext) in rb_free_extent()
174 bp->rcursor = NULL; in rb_free_extent()
175 if (bp->rcursor_next == ext) in rb_free_extent()
176 bp->rcursor_next = NULL; in rb_free_extent()
182 struct ext2fs_rb_private *bp; in rb_alloc_private_data() local
185 retval = ext2fs_get_mem(sizeof (struct ext2fs_rb_private), &bp); in rb_alloc_private_data()
189 bp->root = RB_ROOT; in rb_alloc_private_data()
190 bp->rcursor = NULL; in rb_alloc_private_data()
191 bp->rcursor_next = NULL; in rb_alloc_private_data()
192 bp->wcursor = NULL; in rb_alloc_private_data()
195 bp->test_hit = 0; in rb_alloc_private_data()
196 bp->mark_hit = 0; in rb_alloc_private_data()
199 bitmap->private = (void *) bp; in rb_alloc_private_data()
230 struct ext2fs_rb_private *bp; in rb_free_bmap() local
232 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_free_bmap()
234 rb_free_tree(&bp->root); in rb_free_bmap()
235 ext2fs_free_mem(&bp); in rb_free_bmap()
236 bp = 0; in rb_free_bmap()
308 struct ext2fs_rb_private *bp; in rb_resize_bmap() local
310 bp = (struct ext2fs_rb_private *) bmap->private; in rb_resize_bmap()
311 bp->rcursor = NULL; in rb_resize_bmap()
312 bp->wcursor = NULL; in rb_resize_bmap()
315 &bp->root); in rb_resize_bmap()
322 bmap->real_end - bmap->end, bp); in rb_resize_bmap()
328 rb_test_bit(struct ext2fs_rb_private *bp, __u64 bit) in rb_test_bit() argument
332 struct rb_node **n = &bp->root.rb_node; in rb_test_bit()
335 rcursor = bp->rcursor; in rb_test_bit()
341 bp->test_hit++; in rb_test_bit()
346 next_ext = bp->rcursor_next; in rb_test_bit()
351 bp->rcursor_next = next_ext; in rb_test_bit()
357 bp->test_hit++; in rb_test_bit()
362 bp->rcursor = NULL; in rb_test_bit()
363 bp->rcursor_next = NULL; in rb_test_bit()
365 rcursor = bp->wcursor; in rb_test_bit()
382 bp->rcursor = ext; in rb_test_bit()
383 bp->rcursor_next = NULL; in rb_test_bit()
391 struct ext2fs_rb_private *bp) in rb_insert_extent() argument
393 struct rb_root *root = &bp->root; in rb_insert_extent()
403 bp->rcursor_next = NULL; in rb_insert_extent()
404 ext = bp->wcursor; in rb_insert_extent()
409 bp->mark_hit++; in rb_insert_extent()
447 bp->wcursor = new_ext; in rb_insert_extent()
456 rb_free_extent(bp, ext); in rb_insert_extent()
476 rb_free_extent(bp, ext); in rb_insert_extent()
483 rb_free_extent(bp, ext); in rb_insert_extent()
495 struct ext2fs_rb_private *bp) in rb_remove_extent() argument
497 struct rb_root *root = &bp->root; in rb_remove_extent()
526 rb_insert_extent(new_start, new_count, bp); in rb_remove_extent()
538 rb_free_extent(bp, ext); in rb_remove_extent()
563 rb_free_extent(bp, ext); in rb_remove_extent()
580 struct ext2fs_rb_private *bp; in rb_mark_bmap() local
583 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_mark_bmap()
586 retval = rb_insert_extent(arg, 1, bp); in rb_mark_bmap()
587 check_tree(&bp->root, __func__); in rb_mark_bmap()
593 struct ext2fs_rb_private *bp; in rb_unmark_bmap() local
596 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_unmark_bmap()
599 retval = rb_remove_extent(arg, 1, bp); in rb_unmark_bmap()
600 check_tree(&bp->root, __func__); in rb_unmark_bmap()
608 struct ext2fs_rb_private *bp; in rb_test_bmap() local
610 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_test_bmap()
613 return rb_test_bit(bp, arg); in rb_test_bmap()
619 struct ext2fs_rb_private *bp; in rb_mark_bmap_extent() local
621 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_mark_bmap_extent()
624 rb_insert_extent(arg, num, bp); in rb_mark_bmap_extent()
625 check_tree(&bp->root, __func__); in rb_mark_bmap_extent()
631 struct ext2fs_rb_private *bp; in rb_unmark_bmap_extent() local
633 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_unmark_bmap_extent()
636 rb_remove_extent(arg, num, bp); in rb_unmark_bmap_extent()
637 check_tree(&bp->root, __func__); in rb_unmark_bmap_extent()
645 struct ext2fs_rb_private *bp; in rb_test_clear_bmap_extent() local
649 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_test_clear_bmap_extent()
650 n = &bp->root.rb_node; in rb_test_clear_bmap_extent()
653 if (len == 0 || ext2fs_rb_empty_root(&bp->root)) in rb_test_clear_bmap_extent()
699 struct ext2fs_rb_private *bp; in rb_set_bmap_range() local
704 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_set_bmap_range()
729 i - first_set, bp); in rb_set_bmap_range()
730 check_tree(&bp->root, __func__); in rb_set_bmap_range()
735 num - first_set, bp); in rb_set_bmap_range()
736 check_tree(&bp->root, __func__); in rb_set_bmap_range()
747 struct ext2fs_rb_private *bp; in rb_get_bmap_range() local
751 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_get_bmap_range()
752 n = &bp->root.rb_node; in rb_get_bmap_range()
755 if (ext2fs_rb_empty_root(&bp->root)) in rb_get_bmap_range()
809 struct ext2fs_rb_private *bp; in rb_clear_bmap() local
811 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_clear_bmap()
813 rb_free_tree(&bp->root); in rb_clear_bmap()
814 bp->rcursor = NULL; in rb_clear_bmap()
815 bp->rcursor_next = NULL; in rb_clear_bmap()
816 bp->wcursor = NULL; in rb_clear_bmap()
817 check_tree(&bp->root, __func__); in rb_clear_bmap()
824 struct ext2fs_rb_private *bp; in rb_find_first_zero() local
827 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_find_first_zero()
828 n = &bp->root.rb_node; in rb_find_first_zero()
835 if (ext2fs_rb_empty_root(&bp->root)) in rb_find_first_zero()
861 struct ext2fs_rb_private *bp; in rb_find_first_set() local
864 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_find_first_set()
865 n = &bp->root.rb_node; in rb_find_first_set()
872 if (ext2fs_rb_empty_root(&bp->root)) in rb_find_first_set()
907 struct ext2fs_rb_private *bp; in rb_print_stats() local
920 bp = (struct ext2fs_rb_private *) bitmap->private; in rb_print_stats()
922 for (node = ext2fs_rb_first(&bp->root); node != NULL; in rb_print_stats()
943 m_hit = ((double)bp->mark_hit / mark_all) * 100; in rb_print_stats()
945 t_hit = ((double)bp->test_hit / test_all) * 100; in rb_print_stats()
949 bp->test_hit, t_hit, bp->mark_hit, m_hit); in rb_print_stats()