ChangeLog, initialize.c:

initialize.c (ext2fs_initialize): Initialize s_inodes_count in a way
  that avoids overflows on disk sizes greater than 4GB.
bitmap-optimize
Theodore Ts'o 1998-05-01 05:32:18 +00:00
parent 4c77fe50d9
commit 353952d157
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
1998-05-01 Theodore Ts'o <tytso@rsts-11.mit.edu>
* initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
way that avoids overflows on disk sizes greater than 4GB.
1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
* ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the

View File

@ -157,7 +157,8 @@ retry:
EXT2_DESC_PER_BLOCK(super) - 1)
/ EXT2_DESC_PER_BLOCK(super);
set_field(s_inodes_count, (super->s_blocks_count*fs->blocksize)/4096);
/* n.b., fs->blocksize is <= 4096 */
set_field(s_inodes_count, super->s_blocks_count/(4096/fs->blocksize));
/*
* There should be at least as many inodes as the user