summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debugfs/debugfs.c2
-rw-r--r--e2fsck/pass2.c2
-rw-r--r--e2fsck/pass5.c8
-rw-r--r--e2fsck/super.c10
-rw-r--r--lib/ext2fs/alloc.c4
-rw-r--r--lib/ext2fs/blknum.c2
-rw-r--r--lib/ext2fs/ext2fs.h2
-rw-r--r--lib/ext2fs/inode.c2
-rw-r--r--lib/ext2fs/rw_bitmaps.c8
-rw-r--r--resize/resize2fs.c15
10 files changed, 27 insertions, 28 deletions
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index e3fb5f30..8e0dc55d 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -293,7 +293,7 @@ static void print_features(struct ext2_super_block * s, FILE *f)
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;
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index d45ff744..cbf1457a 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -987,7 +987,7 @@ out_htree:
* 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)){
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index aee4e5fa..ef8e1412 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -162,7 +162,7 @@ redo_counts:
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);
@@ -300,7 +300,7 @@ redo_counts:
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++;
}
@@ -423,7 +423,7 @@ redo_counts:
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 */
@@ -526,7 +526,7 @@ do_counts:
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++;
}
diff --git a/e2fsck/super.c b/e2fsck/super.c
index b10539a9..fbc8b8a2 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -647,8 +647,8 @@ void check_super_block(e2fsck_t ctx)
}
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);
@@ -660,7 +660,7 @@ void check_super_block(e2fsck_t ctx)
}
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;
@@ -668,8 +668,8 @@ void check_super_block(e2fsck_t ctx)
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;
diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c
index a711d456..932103d2 100644
--- a/lib/ext2fs/alloc.c
+++ b/lib/ext2fs/alloc.c
@@ -38,7 +38,7 @@ static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map,
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) +
@@ -82,7 +82,7 @@ static void check_inode_uninit(ext2_filsys fs, ext2fs_inode_bitmap map,
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;
diff --git a/lib/ext2fs/blknum.c b/lib/ext2fs/blknum.c
index 6ebe47eb..83f43cf4 100644
--- a/lib/ext2fs/blknum.c
+++ b/lib/ext2fs/blknum.c
@@ -439,7 +439,7 @@ void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group)
/*
* 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;
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index eb655b52..2112a681 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -763,7 +763,7 @@ extern void ext2fs_bg_itable_unused_set(ext2_filsys fs, dgrp_t group,
__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);
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
index e439b1c5..6e3adbc3 100644
--- a/lib/ext2fs/inode.c
+++ b/lib/ext2fs/inode.c
@@ -435,7 +435,7 @@ errcode_t ext2fs_get_next_inode_full(ext2_inode_scan scan, ext2_ino_t *ino,
* 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)
diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c
index 7878be61..f85473af 100644
--- a/lib/ext2fs/rw_bitmaps.c
+++ b/lib/ext2fs/rw_bitmaps.c
@@ -70,7 +70,7 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
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;
@@ -102,7 +102,7 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
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;
@@ -237,7 +237,7 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
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) {
@@ -259,7 +259,7 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
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) {
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 869ae626..538c7b77 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -199,7 +199,7 @@ static void fix_uninit_block_bitmaps(ext2_filsys fs)
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) +
@@ -755,7 +755,7 @@ static void mark_fs_metablock(ext2_resize_t rfs,
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.
@@ -816,7 +816,7 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
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.
@@ -1791,7 +1791,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
/*
* 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)
@@ -1825,7 +1825,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
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,
@@ -1849,7 +1849,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
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)) {
@@ -1865,8 +1865,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
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;