Home | History | Annotate | Download | only in e2fsck

Lines Matching refs:fs

32 	init_resource_track(&rtrack, ctx->fs->io);
39 if ((ctx->progress)(ctx, 5, 0, ctx->fs->group_desc_count*2))
64 print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io);
105 ext2_filsys fs = ctx->fs;
121 fs->group_desc_count * sizeof(int), "free block count array");
123 if ((fs->super->s_first_data_block <
125 (fs->super->s_blocks_count-1 >
128 pctx.blk = fs->super->s_first_data_block;
129 pctx.blk2 = fs->super->s_blocks_count -1;
138 if ((fs->super->s_first_data_block <
139 ext2fs_get_block_bitmap_start(fs->block_map)) ||
140 (fs->super->s_blocks_count-1 >
141 ext2fs_get_block_bitmap_end(fs->block_map))) {
143 pctx.blk = fs->super->s_first_data_block;
144 pctx.blk2 = fs->super->s_blocks_count -1;
145 pctx.ino = ext2fs_get_block_bitmap_start(fs->block_map);
146 pctx.ino2 = ext2fs_get_block_bitmap_end(fs->block_map);
153 csum_flag = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
160 (fs->group_desc[group].bg_flags & EXT2_BG_BLOCK_UNINIT))
162 for (i = fs->super->s_first_data_block;
163 i < fs->super->s_blocks_count;
171 ext2fs_super_and_bgd_loc(fs, group, &super_blk,
174 if (fs->super->s_feature_incompat &
176 old_desc_blocks = fs->super->s_first_meta_bg;
178 old_desc_blocks = fs->desc_blocks +
179 fs->super->s_reserved_gdt_blocks;
191 if (i == fs->group_desc[group].bg_block_bitmap)
193 else if (i == fs->group_desc[group].bg_inode_bitmap)
195 else if (i >= fs->group_desc[group].bg_inode_table &&
196 (i < fs->group_desc[group].bg_inode_table
197 + fs->inode_blocks_per_group))
201 bitmap = ext2fs_fast_test_block_bitmap(fs->block_map, i);
222 fs->group_desc[group].bg_flags &=
250 if ((blocks == fs->super->s_blocks_per_group) ||
251 (i == fs->super->s_blocks_count-1)) {
259 fs->group_desc_count*2))
262 (i != fs->super->s_blocks_count-1) &&
263 (fs->group_desc[group].bg_flags &
277 ext2fs_free_block_bitmap(fs->block_map);
279 &fs->block_map);
286 ext2fs_set_bitmap_padding(fs->block_map);
287 ext2fs_mark_bb_dirty(fs);
291 memset(free_array, 0, fs->group_desc_count * sizeof(int));
294 ext2fs_unmark_valid(fs);
296 for (i = 0; i < fs->group_desc_count; i++) {
297 if (free_array[i] != fs->group_desc[i].bg_free_blocks_count) {
299 pctx.blk = fs->group_desc[i].bg_free_blocks_count;
304 fs->group_desc[i].bg_free_blocks_count =
306 ext2fs_mark_super_dirty(fs);
308 ext2fs_unmark_valid(fs);
311 if (free_blocks != fs->super->s_free_blocks_count) {
313 pctx.blk = fs->super->s_free_blocks_count;
317 fs->super->s_free_blocks_count = free_blocks;
318 ext2fs_mark_super_dirty(fs);
320 ext2fs_unmark_valid(fs);
328 ext2_filsys fs = ctx->fs;
346 fs->group_desc_count * sizeof(int), "free inode count array");
349 fs->group_desc_count * sizeof(int), "directory count array");
352 (fs->super->s_inodes_count >
356 pctx.blk2 = fs->super->s_inodes_count;
364 if ((1 < ext2fs_get_inode_bitmap_start(fs->inode_map)) ||
365 (fs->super->s_inodes_count >
366 ext2fs_get_inode_bitmap_end(fs->inode_map))) {
369 pctx.blk2 = fs->super->s_inodes_count;
370 pctx.ino = ext2fs_get_inode_bitmap_start(fs->inode_map);
371 pctx.ino2 = ext2fs_get_inode_bitmap_end(fs->inode_map);
378 csum_flag = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
385 (fs->group_desc[group].bg_flags & EXT2_BG_INODE_UNINIT))
389 for (i = 1; i <= fs->super->s_inodes_count && i > 0; i++) {
394 bitmap = ext2fs_fast_test_inode_bitmap(fs->inode_map, i);
418 fs->group_desc[group].bg_flags &=
449 if ((inodes == fs->super->s_inodes_per_group) ||
450 (i == fs->super->s_inodes_count)) {
460 group + fs->group_desc_count,
461 fs->group_desc_count*2))
464 (i != fs->super->s_inodes_count) &&
465 (fs->group_desc[group].bg_flags &
480 ext2fs_free_inode_bitmap(fs->inode_map);
482 &fs->inode_map);
489 ext2fs_set_bitmap_padding(fs->inode_map);
490 ext2fs_mark_ib_dirty(fs);
495 memset(free_array, 0, fs->group_desc_count * sizeof(int));
496 memset(dir_array, 0, fs->group_desc_count * sizeof(int));
499 ext2fs_unmark_valid(fs);
501 for (i = 0; i < fs->group_desc_count; i++) {
502 if (free_array[i] != fs->group_desc[i].bg_free_inodes_count) {
504 pctx.ino = fs->group_desc[i].bg_free_inodes_count;
508 fs->group_desc[i].bg_free_inodes_count =
510 ext2fs_mark_super_dirty(fs);
512 ext2fs_unmark_valid(fs);
514 if (dir_array[i] != fs->group_desc[i].bg_used_dirs_count) {
516 pctx.ino = fs->group_desc[i].bg_used_dirs_count;
521 fs->group_desc[i].bg_used_dirs_count =
523 ext2fs_mark_super_dirty(fs);
525 ext2fs_unmark_valid(fs);
528 if (free_inodes != fs->super->s_free_inodes_count) {
530 pctx.ino = fs->super->s_free_inodes_count;
534 fs->super->s_free_inodes_count = free_inodes;
535 ext2fs_mark_super_dirty(fs);
537 ext2fs_unmark_valid(fs);
546 ext2_filsys fs = ctx->fs;
552 end = EXT2_INODES_PER_GROUP(fs->super) * fs->group_desc_count;
553 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, end,
566 if (!ext2fs_test_inode_bitmap(fs->inode_map, i)) {
569 ext2fs_mark_inode_bitmap(fs->inode_map,
571 ext2fs_mark_ib_dirty(fs);
573 ext2fs_unmark_valid(fs);
578 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map,
590 ext2_filsys fs = ctx->fs;
596 end = ext2fs_get_block_bitmap_start(fs->block_map) +
597 (EXT2_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count) - 1;
598 pctx.errcode = ext2fs_fudge_block_bitmap_end(fs->block_map, end,
611 if (!ext2fs_test_block_bitmap(fs->block_map, i)) {
614 ext2fs_mark_block_bitmap(fs->block_map,
616 ext2fs_mark_bb_dirty(fs);
618 ext2fs_unmark_valid(fs);
623 pctx.errcode = ext2fs_fudge_block_bitmap_end(fs->block_map,