static void print_bg_opts(ext2_filsys fs, dgrp_t group, int mask,
const char *str, int *first, FILE *f)
{
- if (ext2fs_bg_flag_test(fs, group, mask)) {
+ if (ext2fs_bg_flags_test(fs, group, mask)) {
if (*first) {
fputs(" [", f);
*first = 0;
* we could call a function in pass1.c that checks the
* newly visible inodes.
*/
- if (ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT)) {
+ if (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)) {
pctx.num = dirent->inode;
if (fix_problem(ctx, PR_2_INOREF_BG_INO_UNINIT,
&cd->pctx)){
save_problem = 0;
pctx.blk = pctx.blk2 = NO_BLK;
if (csum_flag &&
- (ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
skip_group++;
for (i = fs->super->s_first_data_block;
i < ext2fs_blocks_count(fs->super);
goto errout;
if (csum_flag &&
(i != ext2fs_blocks_count(fs->super)-1) &&
- ext2fs_bg_flag_test(fs, group,
+ ext2fs_bg_flags_test(fs, group,
EXT2_BG_BLOCK_UNINIT))
skip_group++;
}
save_problem = 0;
pctx.ino = pctx.ino2 = 0;
if (csum_flag &&
- (ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT)))
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)))
skip_group++;
/* Protect loop from wrap-around if inodes_count is maxed */
goto errout;
if (csum_flag &&
(i != fs->super->s_inodes_count) &&
- (ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT)
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)
))
skip_group++;
}
}
if (!csum_flag &&
- (ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT) ||
- ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT) ||
+ (ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) ||
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) ||
gd->bg_itable_unused != 0)){
if (fix_problem(ctx, PR_0_GDT_UNINIT, &pctx)) {
ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
}
if (i == fs->group_desc_count - 1 &&
- ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT)) {
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT)) {
if (fix_problem(ctx, PR_0_BB_UNINIT_LAST, &pctx)) {
ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
should_be = 1;
ext2fs_unmark_valid(fs);
}
- if (ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
- !ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT)) {
+ if (ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
+ !ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT)) {
if (fix_problem(ctx, PR_0_BB_UNINIT_IB_INIT, &pctx)) {
ext2fs_bg_flags_clear(fs, i, EXT2_BG_BLOCK_UNINIT);
should_be = 1;
if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) ||
- !(ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
+ !(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)))
return;
blk = (group * fs->super->s_blocks_per_group) +
if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) ||
- !(ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT)))
+ !(ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT)))
return;
ino = (group * fs->super->s_inodes_per_group) + 1;
/*
* Get the value of a particular flag for this block group
*/
-int ext2fs_bg_flag_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag)
+int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag)
{
if (fs->super->s_desc_size >= EXT2_MIN_DESC_SIZE_64BIT) {
struct ext4_group_desc *gdp;
__u32 n);
extern __u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group);
extern void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group);
-extern int ext2fs_bg_flag_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
+extern int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
extern void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
extern __u16 ext2fs_bg_checksum(ext2_filsys fs, dgrp_t group);
* they can be done for block group #0.
*/
if ((scan->scan_flags & EXT2_SF_DO_LAZY) &&
- (ext2fs_bg_flag_test(scan->fs, scan->current_group, EXT2_BG_INODE_UNINIT)
+ (ext2fs_bg_flags_test(scan->fs, scan->current_group, EXT2_BG_INODE_UNINIT)
))
goto force_new_group;
if (scan->inodes_left == 0)
if (!do_block)
goto skip_block_bitmap;
- if (csum_flag && ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT)
+ if (csum_flag && ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT)
)
goto skip_this_block_bitmap;
if (!do_inode)
continue;
- if (csum_flag && ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT)
+ if (csum_flag && ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT)
)
goto skip_this_inode_bitmap;
if (block_bitmap) {
blk = fs->group_desc[i].bg_block_bitmap;
if (csum_flag &&
- ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
ext2fs_group_desc_csum_verify(fs, i))
blk = 0;
if (blk) {
if (inode_bitmap) {
blk = fs->group_desc[i].bg_inode_bitmap;
if (csum_flag &&
- ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT) &&
+ ext2fs_bg_flags_test(fs, i, EXT2_BG_INODE_UNINIT) &&
ext2fs_group_desc_csum_verify(fs, i))
blk = 0;
if (blk) {
return;
for (g=0; g < fs->group_desc_count; g++) {
- if (!(ext2fs_bg_flag_test(fs, g, EXT2_BG_BLOCK_UNINIT)))
+ if (!(ext2fs_bg_flags_test(fs, g, EXT2_BG_BLOCK_UNINIT)))
continue;
blk = (g * fs->super->s_blocks_per_group) +
rfs->needed_blocks++;
} else if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
- (ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT))) {
+ (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) {
/*
* If the block bitmap is uninitialized, which means
* nothing other than standard metadata in use.
g = ext2fs_group_of_blk(fs, blk);
if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
- ext2fs_bg_flag_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) {
+ ext2fs_bg_flags_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) {
/*
* The block bitmap is uninitialized, so skip
* to the next block group.
/*
* First calculate the block statistics
*/
- uninit = ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT);
+ uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT);
ext2fs_super_and_bgd_loc(fs, group, &super_blk, &old_desc_blk,
&new_desc_blk, 0);
if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
group++;
count = 0;
group_free = 0;
- uninit = (ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT)
+ uninit = (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)
);
ext2fs_super_and_bgd_loc(fs, group, &super_blk,
&old_desc_blk,
group = 0;
/* Protect loop from wrap-around if s_inodes_count maxed */
- uninit = ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT);
+ uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT);
for (ino = 1; ino <= fs->super->s_inodes_count && ino > 0; ino++) {
if (uninit ||
!ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino)) {
group++;
count = 0;
group_free = 0;
- uninit = (ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT)
- );
+ uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT);
}
}
fs->super->s_free_inodes_count = total_free;