ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c, util.c, util.h:
ke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
journal must be bewteen 1024 and 10,240 file system blocks.
mke2fs.c, tune2fs.c: Change to use figure_journal_size()
util.c, util.h (figure_journal_size): Change journal_default_size into
routine which also converts the requested journal size into filesystem
blocks and does bounds checking to make sure the journal is sized
reasonably. Renamed function to journal_default_size.
parse_journal_opts): Remove bounds check for the journal size, since
this is now done in figure_journal_size, and based on the number of
filesystem blocks, as opposed to using the absolute size of the
journal.
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index c75b299..9f9f332 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1216,11 +1216,7 @@
printf(_("done\n"));
ext2fs_close(jfs);
} else if (journal_size) {
- if (journal_size < 0)
- journal_blocks = journal_default_size(fs->super->s_blocks_count);
- else
- journal_blocks = journal_size * 1024 /
- (fs->blocksize / 1024);
+ journal_blocks = figure_journal_size(journal_size, fs);
if (!journal_blocks) {
fs->super->s_feature_compat &=
@@ -1252,8 +1248,9 @@
printf(_("\nWarning, had trouble writing out superblocks."));
}
if (!quiet) {
- printf(_("done\n"));
- printf(_("e2fsck will be run every %d mounts or %4g days"),
+ printf(_("done\n\n"));
+ printf(_("Filesystem will be checked run "
+ "every %d mounts or %g days.\n"),
fs->super->s_max_mnt_count,
(double)fs->super->s_checkinterval / (3600 * 24));
}