Lines Matching refs:ext3_sb
49 if (block_group >= sb->u.ext3_sb.s_groups_count) { in ext3_get_group_desc()
53 block_group, sb->u.ext3_sb.s_groups_count); in ext3_get_group_desc()
60 if (!sb->u.ext3_sb.s_group_desc[group_desc]) { in ext3_get_group_desc()
69 sb->u.ext3_sb.s_group_desc[group_desc]->b_data; in ext3_get_group_desc()
71 *bh = sb->u.ext3_sb.s_group_desc[group_desc]; in ext3_get_group_desc()
107 sb->u.ext3_sb.s_block_bitmap_number[bitmap_nr] = block_group; in read_block_bitmap()
108 sb->u.ext3_sb.s_block_bitmap[bitmap_nr] = bh; in read_block_bitmap()
132 if (block_group >= sb->u.ext3_sb.s_groups_count) in __load_block_bitmap()
136 block_group, sb->u.ext3_sb.s_groups_count); in __load_block_bitmap()
138 if (sb->u.ext3_sb.s_groups_count <= EXT3_MAX_GROUP_LOADED) { in __load_block_bitmap()
139 if (sb->u.ext3_sb.s_block_bitmap[block_group]) { in __load_block_bitmap()
140 if (sb->u.ext3_sb.s_block_bitmap_number[block_group] == in __load_block_bitmap()
152 for (i = 0; i < sb->u.ext3_sb.s_loaded_block_bitmaps && in __load_block_bitmap()
153 sb->u.ext3_sb.s_block_bitmap_number[i] != block_group; i++) in __load_block_bitmap()
155 if (i < sb->u.ext3_sb.s_loaded_block_bitmaps && in __load_block_bitmap()
156 sb->u.ext3_sb.s_block_bitmap_number[i] == block_group) { in __load_block_bitmap()
157 block_bitmap_number = sb->u.ext3_sb.s_block_bitmap_number[i]; in __load_block_bitmap()
158 block_bitmap = sb->u.ext3_sb.s_block_bitmap[i]; in __load_block_bitmap()
160 sb->u.ext3_sb.s_block_bitmap_number[j] = in __load_block_bitmap()
161 sb->u.ext3_sb.s_block_bitmap_number[j - 1]; in __load_block_bitmap()
162 sb->u.ext3_sb.s_block_bitmap[j] = in __load_block_bitmap()
163 sb->u.ext3_sb.s_block_bitmap[j - 1]; in __load_block_bitmap()
165 sb->u.ext3_sb.s_block_bitmap_number[0] = block_bitmap_number; in __load_block_bitmap()
166 sb->u.ext3_sb.s_block_bitmap[0] = block_bitmap; in __load_block_bitmap()
176 if (sb->u.ext3_sb.s_loaded_block_bitmaps<EXT3_MAX_GROUP_LOADED) in __load_block_bitmap()
177 sb->u.ext3_sb.s_loaded_block_bitmaps++; in __load_block_bitmap()
179 brelse (sb->u.ext3_sb.s_block_bitmap in __load_block_bitmap()
181 for (j = sb->u.ext3_sb.s_loaded_block_bitmaps - 1; in __load_block_bitmap()
183 sb->u.ext3_sb.s_block_bitmap_number[j] = in __load_block_bitmap()
184 sb->u.ext3_sb.s_block_bitmap_number[j - 1]; in __load_block_bitmap()
185 sb->u.ext3_sb.s_block_bitmap[j] = in __load_block_bitmap()
186 sb->u.ext3_sb.s_block_bitmap[j - 1]; in __load_block_bitmap()
215 if (sb->u.ext3_sb.s_loaded_block_bitmaps > 0 && in load_block_bitmap()
216 sb->u.ext3_sb.s_block_bitmap_number[0] == block_group && in load_block_bitmap()
217 sb->u.ext3_sb.s_block_bitmap[0]) { in load_block_bitmap()
224 else if (sb->u.ext3_sb.s_groups_count <= EXT3_MAX_GROUP_LOADED && in load_block_bitmap()
225 sb->u.ext3_sb.s_block_bitmap_number[block_group]==block_group in load_block_bitmap()
226 && sb->u.ext3_sb.s_block_bitmap[block_group]) { in load_block_bitmap()
246 if (!sb->u.ext3_sb.s_block_bitmap[slot]) in load_block_bitmap()
278 es = sb->u.ext3_sb.s_es; in ext3_free_blocks()
308 bitmap_bh = sb->u.ext3_sb.s_block_bitmap[bitmap_nr]; in ext3_free_blocks()
333 BUFFER_TRACE(sb->u.ext3_sb.s_sbh, "get_write_access"); in ext3_free_blocks()
334 err = ext3_journal_get_write_access(handle, sb->u.ext3_sb.s_sbh); in ext3_free_blocks()
412 BUFFER_TRACE(sb->u.ext3_sb.s_sbh, "dirtied superblock"); in ext3_free_blocks()
413 ret = ext3_journal_dirty_metadata(handle, sb->u.ext3_sb.s_sbh); in ext3_free_blocks()
566 es = sb->u.ext3_sb.s_es; in ext3_new_block()
569 ((sb->u.ext3_sb.s_resuid != current->fsuid) && in ext3_new_block()
570 (sb->u.ext3_sb.s_resgid == 0 || in ext3_new_block()
571 !in_group_p (sb->u.ext3_sb.s_resgid)) && in ext3_new_block()
601 bh = sb->u.ext3_sb.s_block_bitmap[bitmap_nr]; in ext3_new_block()
624 for (k = 0; k < sb->u.ext3_sb.s_groups_count; k++) { in ext3_new_block()
626 if (i >= sb->u.ext3_sb.s_groups_count) in ext3_new_block()
638 bh = sb->u.ext3_sb.s_block_bitmap[bitmap_nr]; in ext3_new_block()
676 BUFFER_TRACE(sb->u.ext3_sb.s_sbh, "get_write_access"); in ext3_new_block()
677 fatal = ext3_journal_get_write_access(handle, sb->u.ext3_sb.s_sbh); in ext3_new_block()
810 err = ext3_journal_dirty_metadata(handle, sb->u.ext3_sb.s_sbh); in ext3_new_block()
848 es = sb->u.ext3_sb.s_es; in ext3_count_free_blocks()
852 for (i = 0; i < sb->u.ext3_sb.s_groups_count; i++) { in ext3_count_free_blocks()
861 x = ext3_count_free (sb->u.ext3_sb.s_block_bitmap[bitmap_nr], in ext3_count_free_blocks()
872 return le32_to_cpu(sb->u.ext3_sb.s_es->s_free_blocks_count); in ext3_count_free_blocks()
881 le32_to_cpu(sb->u.ext3_sb.s_es->s_first_data_block)) % in block_in_use()
949 es = sb->u.ext3_sb.s_es; in ext3_check_blocks_bitmap()
953 for (i = 0; i < sb->u.ext3_sb.s_groups_count; i++) { in ext3_check_blocks_bitmap()
987 for (j = 0; j < sb->u.ext3_sb.s_itb_per_group; j++) in ext3_check_blocks_bitmap()