20 #define BITMAP_BLKSIZE ( sizeof ( bitmap_block_t ) * 8 ) 28 #define BITMAP_INDEX( bit ) ( (bit) / BITMAP_BLKSIZE ) 36 #define BITMAP_MASK( bit ) ( 1UL << ( (bit) % BITMAP_BLKSIZE ) ) int bitmap_resize(struct bitmap *bitmap, unsigned int new_length)
Resize bitmap.
static unsigned int unsigned int bit
static void bitmap_free(struct bitmap *bitmap)
Free bitmap resources.
unsigned int length
Length of the bitmap, in bits.
unsigned long bitmap_block_t
A single block of bits within a bitmap.
bitmap_block_t * blocks
Bitmap data.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void(* free)(struct refcnt *refcnt))
unsigned int first_gap
Index of first gap in the bitmap.
int bitmap_test(struct bitmap *bitmap, unsigned int bit)
Test bit in bitmap.
static unsigned int bitmap_first_gap(struct bitmap *bitmap)
Get first gap within bitmap.
void bitmap_set(struct bitmap *bitmap, unsigned int bit)
Set bit in bitmap.
static int bitmap_full(struct bitmap *bitmap)
Check to see if bitmap is full.