ChangeLog, initialize.c:

initialize.c (ext2fs_initialize): Make sure that we allocate enough
  	inodes so that we can make a valid filesystem.
This commit is contained in:
Theodore Ts'o 1998-09-23 00:27:26 +00:00
parent 7f813ba337
commit 8d7e83b025
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
1998-09-22 Theodore Ts'o <tytso@rsts-11.mit.edu>
* initialize.c (ext2fs_initialize): Make sure that we allocate
enough inodes so that we can make a valid filesystem.
1998-09-02 Theodore Ts'o <tytso@rsts-11.mit.edu>
* rw_bitmaps.c: Fixed signed/unsigned warnings.

View File

@ -160,6 +160,13 @@ retry:
/* n.b., fs->blocksize is <= 4096 */
set_field(s_inodes_count, super->s_blocks_count/(4096/fs->blocksize));
/*
* Make sure we have at least EXT2_FIRST_INO + 1 inodes, so
* that we have enough inodes for the filesystem(!)
*/
if (super->s_inodes_count < EXT2_FIRST_INO(super)+1)
super->s_inodes_count = EXT2_FIRST_INO(super)+1;
/*
* There should be at least as many inodes as the user
* requested. Figure out how many inodes per group that