• Home
  • Raw
  • Download

Lines Matching refs:fs

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