summaryrefslogtreecommitdiff
path: root/misc/util.h
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-09-13 22:24:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-09-13 22:42:19 -0400
commitfaa2dcdad0f5af3945a70bdecc8713b3a74cdf9c (patch)
tree77ce58f1c9bc81f2540ab7dd8f81e840a086118f /misc/util.h
parent906a1cf9b60b336ccf44706c7f1906056282fbf0 (diff)
downloade2fsprogs-faa2dcdad0f5af3945a70bdecc8713b3a74cdf9c.tar.gz
mke2fs: Use ext2fs_flush() only once
We are doing ext2fs_flush() twice right now at the end of the mke2fs. First by directly calling ext2fs_flush() which is intended to write superblock and fs accounting information. And then it is invoked again when we are calling ext2fs_close(), only this time, because the fs is not dirty, we are writing out only superblock. I think it is bad to call it twice because even when writing only super block it takes some time on bigger file systems and moreover ext2fs_close() can fail without any reasonable explanation for the user. Also ext2fs_flush() is printing out progress and it is confusing for the users. Fix all this by removing the ext2fs_flush() and leaving it all to ext2fs_close(). However we need to introduce new variables to store check interval and max mount count, because fs structure is freed on ext2fs_close() and we really want to print those information as the last info for the user. [ Fixed type mismatch in a printf format statement -tytso] Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/util.h')
-rw-r--r--misc/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/util.h b/misc/util.h
index e0c99f6c..d05f17e4 100644
--- a/misc/util.h
+++ b/misc/util.h
@@ -23,4 +23,4 @@ extern void check_plausibility(const char *device);
extern void parse_journal_opts(const char *opts);
extern void check_mount(const char *device, int force, const char *type);
extern unsigned int figure_journal_size(int size, ext2_filsys fs);
-extern void print_check_message(ext2_filsys fs);
+extern void print_check_message(unsigned int, unsigned int);