diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 44f45aa5..b0cbc42d 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -534,7 +534,10 @@ static void create_lost_and_found(ext2_filsys fs) } for (i=1; i < EXT2_NDIR_BLOCKS; i++) { - if ((lpf_size += fs->blocksize) >= 16*1024) + /* Ensure that lost+found is at least 2 blocks, so we always + * test large empty blocks for big-block filesystems. */ + if ((lpf_size += fs->blocksize) >= 16*1024 && + lpf_size >= 2 * fs->blocksize) break; retval = ext2fs_expand_dir(fs, ino); if (retval) {