Lines Matching defs:bitmap

35  *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
93 * mapped to the buddy and bitmap information regarding different
97 * block bitmap and buddy information. The information are stored in the
101 * [ group 0 bitmap][ group 0 buddy] [group 1][ group 1]...
104 * one block each for bitmap and buddy information. So for each group we
139 * largest free order in the buddy bitmap of the participating group infos of
141 * number of buddy bitmap orders possible) number of lists. Group-infos are
197 * not, we search in the specific group using bitmap for best extents. The
225 * - on-disk bitmap
226 * - in-core buddy (actually includes buddy and bitmap)
246 * in-core buddy = on-disk bitmap + preallocation descriptors
257 * blocks: how many blocks marked used/free in on-disk bitmap, buddy and PA.
266 * note: 'buddy -= on-disk - PA' is used to show that on-disk bitmap
268 * bits from PA, only from on-disk bitmap
279 * on-disk bitmap if buddy has same bit set or/and PA covers corresponded
288 * we need to make sure that either on-disk bitmap or PA has uptodate data
317 * - PA is referenced until block isn't marked in on-disk bitmap
318 * - PA changes only after on-disk bitmap
321 * - buddy init as sum of on-disk bitmap and PAs is done atomically
334 * mark bits in on-disk bitmap
340 * mark bits in on-disk bitmap
346 * mark bits in on-disk bitmap
352 * load on-disk bitmap
383 * - generate in-core bitmap:
418 static void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
592 static void mb_cmp_bitmaps(struct ext4_buddy *e4b, void *bitmap)
596 if (memcmp(e4b->bd_info->bb_bitmap, bitmap, e4b->bd_sb->s_blocksize)) {
600 b2 = (unsigned char *) bitmap;
650 static inline void mb_cmp_bitmaps(struct ext4_buddy *e4b, void *bitmap)
782 * Clear the bits in bitmap which the blocks of the chunk(s) covered,
1181 void *buddy, void *bitmap, ext4_group_t group,
1193 /* initialize buddy from bitmap which is aggregation
1194 * of on-disk bitmap and preallocations */
1195 i = mb_find_next_zero_bit(bitmap, max, 0);
1200 i = mb_find_next_bit(bitmap, max, i);
1208 i = mb_find_next_zero_bit(bitmap, max, i);
1214 "block bitmap and bg descriptor "
1219 * corrupt and update bb_free using bitmap value
1256 * block bitmap and buddy information. The information are
1260 * [ group 0 bitmap][ group 0 buddy] [group 1][ group 1]...
1263 * one block each for bitmap and buddy information.
1288 char *bitmap;
1338 mb_debug(sb, "read bitmap for group %u\n", group);
1374 bitmap = bh[group - first_group]->b_data;
1377 * We place the buddy block and bitmap block
1396 * incore got set to the group block bitmap below
1405 /* this is block of bitmap */
1407 mb_debug(sb, "put bitmap for group %u in page %lu/%x\n",
1413 memcpy(data, bitmap, blocksize);
1415 /* mark all preallocated blks used in in-core bitmap */
1439 * Lock the buddy and bitmap pages. This make sure other parallel init_group
1441 * Return locked buddy and bitmap pages on e4b struct. If buddy and bitmap
1457 * the buddy cache inode stores the block bitmap
1472 /* buddy and bitmap are on the same page */
1547 * If both the bitmap and buddy are in
1613 * the buddy cache inode stores the block bitmap
1638 "ext4: bitmap's paging->mapping != inode->i_mapping\n")) {
1680 "ext4: buddy bitmap's page->mapping != inode->i_mapping\n")) {
1820 static inline int mb_buddy_adjust_border(int* bit, void* bitmap, int side)
1822 if (mb_test_bit(*bit + side, bitmap)) {
1823 mb_clear_bit(*bit, bitmap);
1829 mb_set_bit(*bit, bitmap);
1938 "freeing already freed block (bit %u); block bitmap corrupt.",
1960 * adjust bitmap bb_counters and borders appropriately.
2154 * group until we update the bitmap. That would mean we
2388 * The routine scans buddy structures (not bitmap!) from given order
2450 void *bitmap = e4b->bd_bitmap;
2462 i = mb_find_next_zero_bit(bitmap,
2466 * IF we have corrupt bitmap, we won't find any
2472 "group info. But bitmap says 0",
2486 j = mb_find_next_bit(bitmap,
2509 * indicate that the bitmap is corrupt. So exit
2534 void *bitmap = e4b->bd_bitmap;
2553 if (!mb_test_bit(i, bitmap)) {
2569 * This is also called BEFORE we load the buddy bitmap.
2758 * Prefetching reads the block bitmap into the buffer cache; but we
2759 * need to make sure that the buddy bitmap in the page cache has been
2764 * TODO: We should actually kick off the buddy bitmap setup in a work
2766 * waiting for the block allocation bitmap read to finish when
3602 /* order 0 is regular bitmap */
4034 * Fix the bitmap and return EFSCORRUPTED
4719 * in on-disk bitmap -- see ext4_mb_release_context()
4991 * used in in-core bitmap. buddy must be generated from this bitmap
4995 void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
5027 mb_set_bits(bitmap, start, len);
5110 * copy on-disk bitmap to buddy
5111 * mark B in on-disk bitmap
5323 * finds all unused blocks in on-disk bitmap, frees them in
5324 * in-core bitmap and buddy.
5376 * from the bitmap and continue.
5439 "Error %d reading block bitmap for %u",
5619 ext4_error_err(sb, -err, "Error %d reading block bitmap for %u",
6109 pr_warn("Failed to read block bitmap\n");
6348 * on-disk bitmap and lose not-yet-available
6408 pr_warn("Failed to read block bitmap\n");
6569 /* need to update group_info->bb_free and bitmap
6616 /* We dirtied the bitmap block */
6617 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
6748 * This marks the blocks as free in the bitmap and buddy.
6837 * need to update group_info->bb_free and bitmap
6862 /* We dirtied the bitmap block */
6863 BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
6886 * one will allocate those blocks, mark it as used in buddy bitmap. This must
6946 void *bitmap;
6949 bitmap = e4b->bd_bitmap;
6958 start = mb_find_next_zero_bit(bitmap, max + 1, start);
6962 next = mb_find_next_bit(bitmap, last + 1, start);
7003 * ext4_trim_all_free walks through group's block bitmap searching for free
7005 * bitmap. Then issue a TRIM command on this extent and free the extent in
7006 * the group buddy bitmap.
7154 void *bitmap;
7162 bitmap = e4b.bd_bitmap;
7171 start = mb_find_next_zero_bit(bitmap, end + 1, start);
7174 next = mb_find_next_bit(bitmap, end + 1, start);