Lines Matching full:start
35 __u64 start; member
61 static int rb_insert_extent(__u64 start, __u64 count,
79 ext->start, ext->start + ext->count); in print_tree()
94 printf("extent: %llu -> %llu (%u)\n", ext->start, in check_tree()
95 ext->start + ext->count, ext->count); in check_tree()
98 if (ext->start < 0) { in check_tree()
99 printf("Tree Error: start is crazy\n"); in check_tree()
100 printf("extent: %llu -> %llu (%u)\n", ext->start, in check_tree()
101 ext->start + ext->count, ext->count); in check_tree()
106 if (old->start > ext->start) { in check_tree()
107 printf("Tree Error: start is crazy\n"); in check_tree()
109 old->start, old->start + old->count, in check_tree()
112 ext->start, ext->start + ext->count, in check_tree()
116 if ((old->start + old->count) >= ext->start) { in check_tree()
119 old->start, old->start + old->count, in check_tree()
122 ext->start, ext->start + ext->count, in check_tree()
141 static void rb_get_new_extent(struct bmap_rb_extent **ext, __u64 start, in rb_get_new_extent() argument
154 new_ext->start = start; in rb_get_new_extent()
285 if ((ext->start + ext->count - 1) <= new_max) in rb_truncate()
287 else if (ext->start > new_max) { in rb_truncate()
293 ext->count = new_max - ext->start + 1; in rb_truncate()
333 if (bit >= rcursor->start && bit < rcursor->start + rcursor->count) { in rb_test_bit()
348 if ((bit >= rcursor->start + rcursor->count) && in rb_test_bit()
349 (bit < next_ext->start)) { in rb_test_bit()
363 if (bit >= rcursor->start && bit < rcursor->start + rcursor->count) in rb_test_bit()
371 if (bit < ext->start) in rb_test_bit()
373 else if (bit >= (ext->start + ext->count)) in rb_test_bit()
384 static int rb_insert_extent(__u64 start, __u64 count, in rb_insert_extent() argument
397 if (start >= ext->start && in rb_insert_extent()
398 start <= (ext->start + ext->count)) { in rb_insert_extent()
410 if (start < ext->start) { in rb_insert_extent()
412 } else if (start > (ext->start + ext->count)) { in rb_insert_extent()
416 if ((start + count) <= (ext->start + ext->count)) in rb_insert_extent()
419 if ((ext->start + ext->count) == start) in rb_insert_extent()
424 count += (start - ext->start); in rb_insert_extent()
425 start = ext->start; in rb_insert_extent()
433 rb_get_new_extent(&new_ext, start, count); in rb_insert_extent()
443 if ((ext->start + ext->count) == start) { in rb_insert_extent()
444 start = ext->start; in rb_insert_extent()
457 if ((ext->start + ext->count) <= start) in rb_insert_extent()
461 if ((start + count) < ext->start) in rb_insert_extent()
465 if ((start + count) >= (ext->start + ext->count)) { in rb_insert_extent()
471 count += ((ext->start + ext->count) - in rb_insert_extent()
472 (start + count)); in rb_insert_extent()
479 new_ext->start = start; in rb_insert_extent()
485 static int rb_remove_extent(__u64 start, __u64 count, in rb_remove_extent() argument
501 if (start < ext->start) { in rb_remove_extent()
504 } else if (start >= (ext->start + ext->count)) { in rb_remove_extent()
509 if ((start > ext->start) && in rb_remove_extent()
510 (start + count) < (ext->start + ext->count)) { in rb_remove_extent()
512 new_start = start + count; in rb_remove_extent()
513 new_count = (ext->start + ext->count) - new_start; in rb_remove_extent()
515 ext->count = start - ext->start; in rb_remove_extent()
521 if ((start + count) >= (ext->start + ext->count)) { in rb_remove_extent()
522 ext->count = start - ext->start; in rb_remove_extent()
533 if (start == ext->start) { in rb_remove_extent()
534 ext->start += count; in rb_remove_extent()
544 if ((ext->start + ext->count) <= start) in rb_remove_extent()
548 if ((start + count) < ext->start) in rb_remove_extent()
552 if ((start + count) >= (ext->start + ext->count)) { in rb_remove_extent()
559 ext->count -= ((start + count) - ext->start); in rb_remove_extent()
560 ext->start = start + count; in rb_remove_extent()
574 arg -= bitmap->start; in rb_mark_bmap()
585 arg -= bitmap->start; in rb_unmark_bmap()
599 arg -= bitmap->start; in rb_test_bmap()
610 arg -= bitmap->start; in rb_mark_bmap_extent()
621 arg -= bitmap->start; in rb_unmark_bmap_extent()
628 __u64 start, unsigned int len) in rb_test_clear_bmap_extent() argument
638 start -= bitmap->start; in rb_test_clear_bmap_extent()
651 if (start < ext->start) { in rb_test_clear_bmap_extent()
653 } else if (start >= (ext->start + ext->count)) { in rb_test_clear_bmap_extent()
670 if ((ext->start + ext->count) <= start) in rb_test_clear_bmap_extent()
674 if ((start + len) <= ext->start) in rb_test_clear_bmap_extent()
684 __u64 start, size_t num, void *in) in rb_set_bmap_range() argument
715 rb_insert_extent(start + first_set - bitmap->start, in rb_set_bmap_range()
720 rb_insert_extent(start + first_set - bitmap->start, in rb_set_bmap_range()
727 __u64 start, size_t num, void *out) in rb_get_bmap_range() argument
738 start -= bitmap->start; in rb_get_bmap_range()
746 if (start < ext->start) { in rb_get_bmap_range()
748 } else if (start >= (ext->start + ext->count)) { in rb_get_bmap_range()
760 pos = ext->start; in rb_get_bmap_range()
762 if (pos >= start + num) in rb_get_bmap_range()
764 if (pos < start) { in rb_get_bmap_range()
765 count -= start - pos; in rb_get_bmap_range()
768 pos = start; in rb_get_bmap_range()
770 if (pos + count > start + num) in rb_get_bmap_range()
771 count = start + num - pos; in rb_get_bmap_range()
775 ((pos - start) % 8) == 0) { in rb_get_bmap_range()
777 int offset = (pos - start) >> 3; in rb_get_bmap_range()
784 ext2fs_fast_set_bit64((pos - start), out); in rb_get_bmap_range()
839 (bitmap->real_end - bitmap->start); in rb_print_stats()
861 bitmap->real_end - bitmap->start); in rb_print_stats()