+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
+ * pass1.c (handle_bad_fs_blocks): use blk_t, not int for first_block.
+
2006-08-30 Eric Sandeen <esandeen@redhat.com>
* unix.c (show_stats): use ext2_ino_t for inode containers.
{
ext2_filsys fs = ctx->fs;
dgrp_t i;
- int first_block;
+ blk_t first_block;
for (i = 0; i < fs->group_desc_count; i++) {
first_block = ext2fs_group_first_block(fs, i);
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
+ * mke2fs.c (PRS): Avoid overflow in megs calculation.
+
2006-08-30 Eric Sandeen <esandeen@redhat.com>
* mke2fs.c (PRS): Disallow > 2^32 inodes at mkfs time.
}
if (!fs_type) {
- int megs = fs_param.s_blocks_count *
+ int megs = (__u64)fs_param.s_blocks_count *
(EXT2_BLOCK_SIZE(&fs_param) / 1024) / 1024;
if (megs <= 3)
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
+ * online.c (online_resize_fs): use div_ceil for r_frac calculation.
+ * resize2fs.c (adjust_fs_info): avoid overflow in blk calculation
+ when figuring new reserved blocks count.
+
2006-08-30 Eric Sandeen <esandeen@redhat.com>
* resize2fs.c (adjust_fs_info): Disallow > 2^32 indoes at resize time.
exit(1);
}
- r_frac = ((100 * sb->s_r_blocks_count) + sb->s_blocks_count-1) /
- sb->s_blocks_count;
+ r_frac = ext2fs_div_ceil(100 * sb->s_r_blocks_count, sb->s_blocks_count);
retval = ext2fs_read_bitmaps(fs);
if (retval)
/*
* Adjust the number of reserved blocks
*/
- blk = old_fs->super->s_r_blocks_count * 100 /
+ blk = (__u64)old_fs->super->s_r_blocks_count * 100 /
old_fs->super->s_blocks_count;
fs->super->s_r_blocks_count = e2p_percent(blk,
fs->super->s_blocks_count);