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;
};
struct ext4_fc_tl *tl, __u8 *val)
{
struct ext4_fc_dentry_info fcd;
- int tag = le16_to_cpu(tl->fc_tag);
memcpy(&fcd, val, sizeof(fcd));
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",
- tag == EXT4_FC_TAG_CREAT ? "create" :
- (tag == EXT4_FC_TAG_LINK ? "link" :
- (tag == EXT4_FC_TAG_UNLINK ? "unlink" : "error")),
- darg->dname, darg->ino, darg->parent_ino);
+ 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" :
+ "error")), darg->dname, darg->ino, darg->parent_ino);
return 0;
}
if (ret)
return ret;
ext4_fc_flush_extents(ctx, darg.ino);
- ret = errcode_to_errno(
- ext2fs_unlink(ctx->fs, darg.parent_ino,
- darg.dname, darg.ino, 0));
+ ret = errcode_to_errno(ext2fs_unlink(ctx->fs, darg.parent_ino,
+ darg.dname, darg.ino, 0));
/* It's okay if the above call fails */
free(darg.dname);
+
return ret;
}
{
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]);
static void e2fsck_pass1_merge_invalid_bitmaps(e2fsck_t global_ctx,
e2fsck_t thread_ctx)
{
- dgrp_t i, j;
dgrp_t grp_start = thread_ctx->thread_info.et_group_start;
dgrp_t grp_end = thread_ctx->thread_info.et_group_end;
dgrp_t total = grp_end - grp_start;
const int line)
{
__u16 badness_before, badness_after;
- __u64 pctx_num_sav = pctx->num;
if (!ctx->inode_badness_threshold) /* badness is disabled */
return;