summaryrefslogtreecommitdiff
path: root/misc/tune2fs.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2001-03-26 20:07:13 +0000
committerTheodore Ts'o <tytso@mit.edu>2001-03-26 20:07:13 +0000
commit2537b6d0c1aa9710a05cdfafc281b4884c67bdb2 (patch)
treef0fb6c0889325dae11e2e95ad954cf71bfe698cb /misc/tune2fs.c
parent0a24c00bea29de9c5ed307d2b4a49e3d08943e7d (diff)
downloade2fsprogs-2537b6d0c1aa9710a05cdfafc281b4884c67bdb2.tar.gz
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.
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r--misc/tune2fs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 88276055..401e27c9 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -303,10 +303,8 @@ static void add_journal(ext2_filsys fs)
} else if (journal_size) {
printf(_("Creating journal inode: "));
fflush(stdout);
- 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);
+
retval = ext2fs_add_journal_inode(fs, journal_blocks,
journal_flags);
if (retval) {