Lines Matching refs:bmap

41 #define EXT2FS_IS_32_BITMAP(bmap) \  argument
42 (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP) || \
43 ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP) || \
44 ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP))
46 #define EXT2FS_IS_64_BITMAP(bmap) \ argument
47 (((bmap)->magic == EXT2_ET_MAGIC_GENERIC_BITMAP64) || \
48 ((bmap)->magic == EXT2_ET_MAGIC_BLOCK_BITMAP64) || \
49 ((bmap)->magic == EXT2_ET_MAGIC_INODE_BITMAP64))
304 ext2fs_generic_bitmap bmap) in ext2fs_resize_generic_bitmap() argument
310 if (!bmap || (bmap->magic != magic)) in ext2fs_resize_generic_bitmap()
317 if (new_end > bmap->end) { in ext2fs_resize_generic_bitmap()
318 bitno = bmap->real_end; in ext2fs_resize_generic_bitmap()
321 for (; bitno > bmap->end; bitno--) in ext2fs_resize_generic_bitmap()
322 ext2fs_clear_bit(bitno - bmap->start, bmap->bitmap); in ext2fs_resize_generic_bitmap()
324 if (new_real_end == bmap->real_end) { in ext2fs_resize_generic_bitmap()
325 bmap->end = new_end; in ext2fs_resize_generic_bitmap()
329 size = ((bmap->real_end - bmap->start) / 8) + 1; in ext2fs_resize_generic_bitmap()
330 new_size = ((new_real_end - bmap->start) / 8) + 1; in ext2fs_resize_generic_bitmap()
333 retval = ext2fs_resize_mem(size, new_size, &bmap->bitmap); in ext2fs_resize_generic_bitmap()
338 memset(bmap->bitmap + size, 0, new_size - size); in ext2fs_resize_generic_bitmap()
340 bmap->end = new_end; in ext2fs_resize_generic_bitmap()
341 bmap->real_end = new_real_end; in ext2fs_resize_generic_bitmap()
381 errcode_t ext2fs_get_generic_bitmap_range(ext2fs_generic_bitmap bmap, in ext2fs_get_generic_bitmap_range() argument
386 if (!bmap || (bmap->magic != magic)) in ext2fs_get_generic_bitmap_range()
389 if ((start < bmap->start) || (start+num-1 > bmap->real_end)) in ext2fs_get_generic_bitmap_range()
392 memcpy(out, bmap->bitmap + (start >> 3), (num+7) >> 3); in ext2fs_get_generic_bitmap_range()
396 errcode_t ext2fs_set_generic_bitmap_range(ext2fs_generic_bitmap bmap, in ext2fs_set_generic_bitmap_range() argument
401 if (!bmap || (bmap->magic != magic)) in ext2fs_set_generic_bitmap_range()
404 if ((start < bmap->start) || (start+num-1 > bmap->real_end)) in ext2fs_set_generic_bitmap_range()
407 memcpy(bmap->bitmap + (start >> 3), in, (num+7) >> 3); in ext2fs_set_generic_bitmap_range()