+2004-01-30 Theodore Ts'o <tytso@mit.edu>
+
+ * pass2.c (deallocate_inode_block): Check to make sure the block
+ number is invalid before deallocating it, to avoid core
+ dumping e2fsck.
+
2003-12-12 Theodore Ts'o <tytso@mit.edu>
* pass3.c (check_directory): When reconnecting a directory, we may
if (HOLE_BLKADDR(*block_nr))
return 0;
+ if ((*block_nr < fs->super->s_first_data_block) ||
+ (*block_nr >= fs->super->s_blocks_count))
+ return 0;
ext2fs_unmark_block_bitmap(ctx->block_found_map, *block_nr);
ext2fs_block_alloc_stats(fs, *block_nr, -1);
return 0;
+2004-01-30 Theodore Ts'o <tytso@mit.edu>
+
+ * ext2_fs.h: Reserve an extra 4 bytes for the journal backup,
+ which we're using due to a typo in the e2fsck code. (Oops)
+
+ * swapfs.c (ext2fs_swap_inode): Fix byte swap bug which causes SE
+ Linux created symlinks with mandatory attributes to fail
+ to be properly handled on big endian systems. (Addresses
+ Debian Bug #228723).
+ (ext2fs_swap_super): Byte swap some new fields in the
+ superblock, including the journal backup fields.
+
2003-12-02 Theodore Ts'o <tytso@mit.edu>
* alloc.c, bb_inode.c, bitops.c, block.c, check_desc.c, closefs.c,
__u32 s_default_mount_opts;
__u32 s_first_meta_bg; /* First metablock group */
__u32 s_mkfs_time; /* When the filesystem was created */
- __u32 s_jnl_blocks[16]; /* Backup of the journal inode */
- __u32 s_reserved[173]; /* Padding to the end of the block */
+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
+ __u32 s_reserved[172]; /* Padding to the end of the block */
};
/*
sb->s_journal_inum = ext2fs_swab32(sb->s_journal_inum);
sb->s_journal_dev = ext2fs_swab32(sb->s_journal_dev);
sb->s_last_orphan = ext2fs_swab32(sb->s_last_orphan);
+ sb->s_default_mount_opts = ext2fs_swab32(sb->s_default_mount_opts);
sb->s_first_meta_bg = ext2fs_swab32(sb->s_first_meta_bg);
+ sb->s_mkfs_time = ext2fs_swab32(sb->s_mkfs_time);
for (i=0; i < 4; i++)
sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
+ for (i=0; i < 17; i++)
+ sb->s_jnl_blocks[i] = ext2fs_swab32(sb->s_jnl_blocks[i]);
+
}
void ext2fs_swap_group_desc(struct ext2_group_desc *gdp)
t->i_links_count = ext2fs_swab16(f->i_links_count);
t->i_blocks = ext2fs_swab32(f->i_blocks);
t->i_flags = ext2fs_swab32(f->i_flags);
- if (!islnk || f->i_blocks) {
+ t->i_file_acl = ext2fs_swab32(f->i_file_acl);
+ t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
+ if (!islnk || ext2fs_inode_data_blocks(fs, t)) {
for (i = 0; i < EXT2_N_BLOCKS; i++)
t->i_block[i] = ext2fs_swab32(f->i_block[i]);
} else if (t != f) {
t->i_block[i] = f->i_block[i];
}
t->i_generation = ext2fs_swab32(f->i_generation);
- t->i_file_acl = ext2fs_swab32(f->i_file_acl);
- t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
t->i_faddr = ext2fs_swab32(f->i_faddr);
switch (fs->super->s_creator_os) {