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;
* 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;
/* Helper struct for dentry replay routines */
struct dentry_info_args {
- ino_t parent_ino;
+ ext2_ino_t parent_ino;
int dname_len;
- ino_t ino;
+ ext2_ino_t ino;
char *dname;
};
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 %d, parent %d\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" :
{
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));
void e2fsck_pass1_run(e2fsck_t ctx)
{
- int i;
ext2_filsys fs = ctx->fs;
ext2_ino_t ino = 0;
struct ext2_inode *inode = NULL;
dgrp_t ra_group = 0;
struct ea_quota ea_ibody_quota;
struct process_inode_block *inodes_to_process;
- int process_inode_count, check_mmp;
+ int process_inode_count, check_mmp = 0;
e2fsck_t global_ctx = ctx->global_ctx ? ctx->global_ctx : ctx;
int inode_exp = 0;
void *ehp;
#ifdef WORDS_BIGENDIAN
__u32 tmp_block[EXT2_N_BLOCKS];
+ int i;
for (i = 0; i < EXT2_N_BLOCKS; i++)
tmp_block[i] = ext2fs_swab32(inode->i_block[i]);
int line = 0;
while (!feof(fp)) {
memset(buf, 0, PATH_MAX);
- fscanf(fp, "%s%*[^\n]", buf);
+ if (fscanf(fp, "%s%*[^\n]", buf) < 1)
+ break;
/* skip the first line */
if (line++ == 0)
continue;