]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
misc: use ext2_ino_t instead of ino_t
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 5 Aug 2022 21:28:54 +0000 (15:28 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Aug 2022 17:00:45 +0000 (13:00 -0400)
Some of the new fastcommit and casefold changes used the system
"ino_t" instead of "ext2_ino_t" for handling filesystem inodes.
This causes printf warnings if the system "ino_t" is of a different
size.  Use the library "ext2_ino_t" for consistency.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/rehash.c
lib/ext2fs/badblocks.c
lib/ext2fs/orphan.c

index 571de83e9c73b648ebcdfe9601093a4611944499..3cd3e306f2dcbc5bfc45d82d7a2aed0486425acb 100644 (file)
@@ -578,7 +578,7 @@ static int ext4_del_extent_from_list(e2fsck_t ctx, struct extent_list *list,
        return ext4_modify_extent_list(ctx, list, ex, 1 /* delete */);
 }
 
-static int ext4_fc_read_extents(e2fsck_t ctx, ino_t ino)
+static int ext4_fc_read_extents(e2fsck_t ctx, ext2_ino_t ino)
 {
        struct extent_list *extent_list = &ctx->fc_replay_state.fc_extent_list;
 
@@ -597,7 +597,7 @@ static int ext4_fc_read_extents(e2fsck_t ctx, ino_t ino)
  * for the inode so that we can flush all of them at once and it also saves us
  * from continuously growing and shrinking the extent tree.
  */
-static void ext4_fc_flush_extents(e2fsck_t ctx, ino_t ino)
+static void ext4_fc_flush_extents(e2fsck_t ctx, ext2_ino_t ino)
 {
        struct extent_list *extent_list = &ctx->fc_replay_state.fc_extent_list;
 
@@ -610,10 +610,10 @@ static void ext4_fc_flush_extents(e2fsck_t ctx, ino_t ino)
 
 /* Helper struct for dentry replay routines */
 struct dentry_info_args {
-       ino_t parent_ino;
-       int dname_len;
-       ino_t ino;
-       char *dname;
+       ext2_ino_t      parent_ino;
+       ext2_ino_t      ino;
+       int             dname_len;
+       char            *dname;
 };
 
 static inline int tl_to_darg(struct dentry_info_args *darg,
@@ -634,7 +634,7 @@ static inline int tl_to_darg(struct dentry_info_args *darg,
               val + sizeof(struct ext4_fc_dentry_info),
               darg->dname_len);
        darg->dname[darg->dname_len] = 0;
-       jbd_debug(1, "%s: %s, ino %lu, parent %lu\n",
+       jbd_debug(1, "%s: %s, ino %u, parent %u\n",
                  le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_CREAT ? "create" :
                  (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_LINK ? "link" :
                   (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_UNLINK ? "unlink" :
@@ -799,7 +799,7 @@ static int ext4_fc_handle_add_extent(e2fsck_t ctx, __u8 *val)
 {
        struct ext2fs_extent extent;
        struct ext4_fc_add_range add_range;
-       ino_t ino;
+       ext2_ino_t ino;
        int ret = 0;
 
        memcpy(&add_range, val, sizeof(add_range));
index 94f83e1336a3788f32a895a60fecce6f2258bde0..73909c391548e6aaa990d7820f4550f36da395d6 100644 (file)
@@ -79,8 +79,8 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
 static void mark_table_blocks(e2fsck_t ctx);
 static void alloc_bb_map(e2fsck_t ctx);
 static void alloc_imagic_map(e2fsck_t ctx);
-static void mark_inode_bad(e2fsck_t ctx, ino_t ino);
-static void add_casefolded_dir(e2fsck_t ctx, ino_t ino);
+static void mark_inode_bad(e2fsck_t ctx, ext2_ino_t ino);
+static void add_casefolded_dir(e2fsck_t ctx, ext2_ino_t ino);
 static void handle_fs_bad_blocks(e2fsck_t ctx);
 static void process_inodes(e2fsck_t ctx, char *block_buf);
 static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b);
@@ -2234,7 +2234,7 @@ static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b)
 /*
  * Mark an inode as being bad in some what
  */
-static void mark_inode_bad(e2fsck_t ctx, ino_t ino)
+static void mark_inode_bad(e2fsck_t ctx, ext2_ino_t ino)
 {
        struct          problem_context pctx;
 
@@ -2255,7 +2255,7 @@ static void mark_inode_bad(e2fsck_t ctx, ino_t ino)
        ext2fs_mark_inode_bitmap2(ctx->inode_bad_map, ino);
 }
 
-static void add_casefolded_dir(e2fsck_t ctx, ino_t ino)
+static void add_casefolded_dir(e2fsck_t ctx, ext2_ino_t ino)
 {
        struct          problem_context pctx;
 
index 8cc36f24fc0ba72b16bd40644e4b3213458c77a8..f9af0329deabe1d5b74abc9a6c1fd314b15f8873 100644 (file)
@@ -89,9 +89,9 @@ struct fill_dir_struct {
 };
 
 struct hash_entry {
-       ext2_dirhash_t  hash;
-       ext2_dirhash_t  minor_hash;
-       ino_t           ino;
+       ext2_dirhash_t          hash;
+       ext2_dirhash_t          minor_hash;
+       ext2_ino_t              ino;
        struct ext2_dir_entry   *dir;
 };
 
index 0f23983bffcba46d81cab4c19ba1278197914849..a306bc06e27147ba961d38e3eeeb99da970a8e4d 100644 (file)
@@ -103,7 +103,7 @@ errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
 
 
 /*
- * This procedure adds a block to a badblocks list.
+ * This procedure adds an item to a tracking list (e.g. badblocks or casefold).
  */
 errcode_t ext2fs_u32_list_add(ext2_u32_list bb, __u32 blk)
 {
index 649a04378f2b7a323f67de5ac96d2b3ef75b5319..e25f20ca247c579ac54ca4b6f36beceb1639fd5c 100644 (file)
@@ -68,7 +68,7 @@ struct mkorphan_info {
        blk_t alloc_blocks;
        blk64_t last_blk;
        errcode_t err;
-       ino_t ino;
+       ext2_ino_t ino;
        __u32 generation;
 };