Home | History | Annotate | Download | only in ext2fs

Lines Matching full:bmap

222 	fprintf(stderr, "%16lu mark bmap\n%16lu unmark_bmap\n",
244 void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap)
246 if (!bmap)
249 if (EXT2FS_IS_32_BITMAP(bmap)) {
250 ext2fs_free_generic_bitmap(bmap);
254 if (!EXT2FS_IS_64_BITMAP(bmap))
259 ext2fs_print_bmap_statistics(bmap);
260 bmap->bitmap_ops->print_stats(bmap);
264 bmap->bitmap_ops->free_bmap(bmap);
266 if (bmap->description) {
267 ext2fs_free_mem(&bmap->description);
268 bmap->description = 0;
270 bmap->magic = 0;
271 ext2fs_free_mem(&bmap);
344 errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap bmap,
348 if (!bmap)
351 if (EXT2FS_IS_32_BITMAP(bmap))
352 return ext2fs_resize_generic_bitmap(bmap->magic, new_end,
353 new_real_end, bmap);
355 if (!EXT2FS_IS_64_BITMAP(bmap))
358 INC_STAT(bmap, resize_count);
360 return bmap->bitmap_ops->resize_bmap(bmap, new_end, new_real_end);
532 errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap bmap,
536 if (!bmap)
539 if (EXT2FS_IS_32_BITMAP(bmap)) {
541 ext2fs_warn_bitmap2(bmap, EXT2FS_UNMARK_ERROR,
545 return ext2fs_set_generic_bitmap_range(bmap, bmap->magic,
549 if (!EXT2FS_IS_64_BITMAP(bmap))
552 INC_STAT(bmap, set_range_count);
554 return bmap->bitmap_ops->set_bmap_range(bmap, start, num, in);
557 errcode_t ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap bmap,
561 if (!bmap)
564 if (EXT2FS_IS_32_BITMAP(bmap)) {
566 ext2fs_warn_bitmap2(bmap,
570 return ext2fs_get_generic_bitmap_range(bmap, bmap->magic,
574 if (!EXT2FS_IS_64_BITMAP(bmap))
577 INC_STAT(bmap, get_range_count);
579 return bmap->bitmap_ops->get_bmap_range(bmap, start, num, out);
612 void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap)
616 if (EXT2FS_IS_32_BITMAP(bmap)) {
617 ext2fs_set_generic_bitmap_padding(bmap);
621 start = bmap->end + 1;
622 num = bmap->real_end - bmap->end;
623 bmap->bitmap_ops->mark_bmap_extent(bmap, start, num);
627 int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bmap,
632 if (!bmap)
637 bmap, block);
639 if (EXT2FS_IS_32_BITMAP(bmap)) {
641 ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
646 (ext2fs_generic_bitmap) bmap, block, num);
649 if (!EXT2FS_IS_64_BITMAP(bmap))
652 INC_STAT(bmap, test_ext_count);
655 block >>= bmap->cluster_bits;
656 end += (1 << bmap->cluster_bits) - 1;
657 end >>= bmap->cluster_bits;
660 if ((block < bmap->start) || (block+num-1 > bmap->end)) {
662 bmap->description);
666 return bmap->bitmap_ops->test_clear_bmap_extent(bmap, block, num);
669 void ext2fs_mark_block_bitmap_range2(ext2fs_block_bitmap bmap,
674 if (!bmap)
677 if (EXT2FS_IS_32_BITMAP(bmap)) {
679 ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
683 ext2fs_mark_block_bitmap_range((ext2fs_generic_bitmap) bmap,
687 if (!EXT2FS_IS_64_BITMAP(bmap))
690 INC_STAT(bmap, mark_ext_count);
693 block >>= bmap->cluster_bits;
694 end += (1 << bmap->cluster_bits) - 1;
695 end >>= bmap->cluster_bits;
698 if ((block < bmap->start) || (block+num-1 > bmap->end)) {
700 bmap->description);
704 bmap->bitmap_ops->mark_bmap_extent(bmap, block, num);
707 void ext2fs_unmark_block_bitmap_range2(ext2fs_block_bitmap bmap,
712 if (!bmap)
715 if (EXT2FS_IS_32_BITMAP(bmap)) {
717 ext2fs_warn_bitmap2((ext2fs_generic_bitmap) bmap,
721 ext2fs_unmark_block_bitmap_range((ext2fs_generic_bitmap) bmap,
725 if (!EXT2FS_IS_64_BITMAP(bmap))
728 INC_STAT(bmap, unmark_ext_count);
731 block >>= bmap->cluster_bits;
732 end += (1 << bmap->cluster_bits) - 1;
733 end >>= bmap->cluster_bits;
736 if ((block < bmap->start) || (block+num-1 > bmap->end)) {
738 bmap->description);
742 bmap->bitmap_ops->unmark_bmap_extent(bmap, block, num);
761 ext2fs_block_bitmap cmap, bmap;
766 bmap = *bitmap;
768 if (fs->cluster_ratio_bits == ext2fs_get_bitmap_granularity(bmap))
776 i = bmap->start;
777 b_end = bmap->end;
778 bmap->end = bmap->real_end;
783 while (i < bmap->real_end) {
784 if (ext2fs_test_block_bitmap2(bmap, i)) {
794 bmap->end = b_end;
796 ext2fs_free_block_bitmap(bmap);