MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / mark_bitmap_end

Function mark_bitmap_end

Ext4Fsd/ext3/generic.c:2650–2662  ·  view source on GitHub ↗

* To avoid calling the atomic setbit hundreds or thousands of times, we only * need to use it within a single byte (to ensure we get endianness right). * We can use memset for the rest of the bitmap as there are no other users. */

Source from the content-addressed store, hash-verified

2648 * We can use memset for the rest of the bitmap as there are no other users.
2649 */
2650void mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
2651{
2652 int i;
2653
2654 if (start_bit >= end_bit)
2655 return;
2656
2657 DEBUG(DL_INF, ("mark end bits +%d through +%d used\n", start_bit, end_bit));
2658 for (i = start_bit; (unsigned)i < ((start_bit + 7) & ~7UL); i++)
2659 ext4_set_bit(i, bitmap);
2660 if (i < end_bit)
2661 memset(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3);
2662}
2663
2664/* Initializes an uninitialized inode bitmap */
2665unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh,

Callers 2

ext4_init_inode_bitmapFunction · 0.85
ext4_init_block_bitmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected