Lines Matching full:bitmap
2 * linux/fs/hfs/bitmap.c
10 * This file contains the code to modify the volume bitmap:
29 static u32 hfs_find_set_zero_bits(__be32 *bitmap, u32 size, u32 offset, u32 *max) in hfs_find_set_zero_bits() argument
40 curr = bitmap + (offset / 32); in hfs_find_set_zero_bits()
41 end = bitmap + ((size + 31) / 32); in hfs_find_set_zero_bits()
70 start = (curr - bitmap) * 32 + i; in hfs_find_set_zero_bits()
108 *max = (curr - bitmap) * 32 + i - start; in hfs_find_set_zero_bits()
116 * Search for 'num_bits' consecutive cleared bits in the bitmap blocks of
127 * returned range. If the bitmap is fragmented, this will be less than
141 void *bitmap; in hfs_vbm_search_free() local
149 bitmap = HFS_SB(sb)->bitmap; in hfs_vbm_search_free()
151 pos = hfs_find_set_zero_bits(bitmap, HFS_SB(sb)->fs_ablocks, goal, num_bits); in hfs_vbm_search_free()
154 pos = hfs_find_set_zero_bits(bitmap, goal, 0, num_bits); in hfs_vbm_search_free()
161 hfs_dbg(BITMAP, "alloc_bits: %u,%u\n", pos, *num_bits); in hfs_vbm_search_free()
174 * Clear the requested bits in the volume bitmap of the hfs filesystem
185 * -2: One or more of the bits are out of range of the bitmap.
189 * Starting with bit number 'start', 'count' bits in the volume bitmap
190 * are cleared. The affected bitmap blocks are marked "dirty", the free
203 hfs_dbg(BITMAP, "clear_bits: %u,%u\n", start, count); in hfs_clear_vbm_bits()
209 /* bitmap is always on a 32-bit boundary */ in hfs_clear_vbm_bits()
210 curr = HFS_SB(sb)->bitmap + (start / 32); in hfs_clear_vbm_bits()