* 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. */
| 2648 | * We can use memset for the rest of the bitmap as there are no other users. |
| 2649 | */ |
| 2650 | void 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 */ |
| 2665 | unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, |
no outgoing calls
no test coverage detected