* [PATCH] e2fsprogs: Check journal inode sanity and recreate journal
@ 2007-03-14 21:13 Kalpak Shah
2007-05-08 5:40 ` Theodore Tso
0 siblings, 1 reply; 3+ messages in thread
From: Kalpak Shah @ 2007-03-14 21:13 UTC (permalink / raw)
To: TheodoreTso; +Cc: linux-ext4, Andreas Dilger
[-- Attachment #1: Type: text/plain, Size: 11697 bytes --]
Hi,
Currently e2fsck does not check the sanity of all the journal blocks.
E2fsck does check EXT2_N_BLOCKS to check is they are sane but if any
indirect blocks belonging to the journal become sparse due to
corruption, e2fsck would not be able to correct this. If such a
filesystem is mounted, it suddenly goes read-only if the sparse blocks
are accessed. So this patch adds sanity checking for all the journal
blocks.
Also, it adds support to recreate the journal if the journal had been
deleted. This means that an ext3 filesystem does not end up as an ext2
filesystem. The journal size is taken from the backup journal inode in
the superblock, if it exists or the default journal size will be used to
recreate the journal.
Also another small change is that, if the backup journal inode from the
superblock has been used, it should be written to disk.
This patch caused some existing regression tests to fail since the
journal was being recreated. I have attached a patch to correct the
expected output for f_badjourblks and f_miss_journal tests. Also I have
attached a regression test for this patch, f_badjour_indblks, which has
a corrupt indirect block in the journal inode.
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Index: e2fsprogs-1.39/e2fsck/journal.c
===================================================================
--- e2fsprogs-1.39.orig/e2fsck/journal.c
+++ e2fsprogs-1.39/e2fsck/journal.c
@@ -206,6 +206,7 @@ static errcode_t e2fsck_get_journal(e2fs
int ext_journal = 0;
int tried_backup_jnl = 0;
int i;
+ unsigned int lblock;
clear_problem_context(&pctx);
@@ -283,6 +284,13 @@ static errcode_t e2fsck_get_journal(e2fs
goto try_backup_journal;
}
}
+ if (tried_backup_jnl && !(ctx->options & E2F_OPT_READONLY)) {
+ retval = ext2fs_write_inode(ctx->fs, sb->s_journal_inum,
+ &j_inode->i_ext2);
+ if (retval)
+ goto errout;
+ }
+
journal->j_maxlen = j_inode->i_ext2.i_size / journal->j_blocksize;
#ifdef USE_INODE_IO
@@ -299,6 +307,20 @@ static errcode_t e2fsck_get_journal(e2fs
if ((retval = journal_bmap(journal, 0, &start)) != 0)
goto errout;
#endif
+ for (lblock = 0; lblock < j_inode->i_ext2.i_size /
+ journal->j_blocksize; lblock++) {
+ unsigned long pblock;
+
+ if ((retval = journal_bmap(journal, lblock,
+ &pblock)) != 0) {
+ goto errout;
+ }
+ if (pblock == 0 || pblock < sb->s_first_data_block ||
+ pblock >= sb->s_blocks_count) {
+ retval = EXT2_ET_BAD_BLOCK_NUM;
+ goto errout;
+ }
+ }
} else {
ext_journal = 1;
if (!ctx->journal_name) {
@@ -418,7 +440,7 @@ static errcode_t e2fsck_journal_fix_bad_
"filesystem is now ext2 only ***\n\n");
sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
sb->s_journal_inum = 0;
- ctx->flags |= E2F_FLAG_JOURNAL_INODE; /* FIXME: todo */
+ ctx->flags |= E2F_FLAG_JOURNAL_INODE;
e2fsck_clear_recover(ctx, 1);
return 0;
}
Index: e2fsprogs-1.39/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.39.orig/e2fsck/unix.c
+++ e2fsprogs-1.39/e2fsck/unix.c
@@ -847,6 +847,7 @@ int main (int argc, char *argv[])
e2fsck_t ctx;
struct problem_context pctx;
int flags, run_result;
+ int journal_blocks, journal_size;
clear_problem_context(&pctx);
#ifdef MTRACE
@@ -1141,8 +1142,43 @@ restart:
" but we'll try to go on...\n"));
}
+ /*
+ * Save the journal size in megabytes.
+ * Try and use the journal size from the backup else let e2fsck
+ * find the default journal size.
+ */
+ if (sb->s_jnl_backup_type == EXT3_JNL_BACKUP_BLOCKS)
+ journal_size = sb->s_jnl_blocks[16] >> 20;
+ else
+ journal_size = -1;
+
run_result = e2fsck_run(ctx);
e2fsck_clear_progbar(ctx);
+
+ if (ctx->flags & E2F_FLAG_JOURNAL_INODE) {
+ if (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &pctx)) {
+ journal_blocks = ext2fs_figure_journal_size(journal_size, fs);
+
+ if (journal_blocks <= 0) {
+ fs->super->s_feature_compat &=
+ ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ goto no_journal;
+ }
+ printf(_("Creating journal (%d blocks): "), journal_blocks);
+ fflush(stdout);
+ retval = ext2fs_add_journal_inode(fs, journal_blocks, 0);
+ if (retval) {
+ com_err("Error ", retval,
+ _("\n\twhile trying to create journal"));
+ goto no_journal;
+ }
+ printf(_(" Done.\n"));
+ printf(_("\n*** journal has been re-created - "
+ "filesystem is now ext3 again ***\n"));
+ }
+ }
+no_journal:
+
if (run_result == E2F_FLAG_RESTART) {
printf(_("Restarting e2fsck from the beginning...\n"));
retval = e2fsck_reset_context(ctx);
Index: e2fsprogs-1.39/lib/ext2fs/ext2fs.h
===================================================================
--- e2fsprogs-1.39.orig/lib/ext2fs/ext2fs.h
+++ e2fsprogs-1.39/lib/ext2fs/ext2fs.h
@@ -869,6 +869,8 @@ extern errcode_t ext2fs_add_journal_devi
ext2_filsys journal_dev);
extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t size,
int flags);
+extern int ext2fs_figure_journal_size(int size, ext2_filsys fs);
+
/* openfs.c */
extern errcode_t ext2fs_open(const char *name, int flags, int superblock,
Index: e2fsprogs-1.39/lib/ext2fs/mkjournal.c
===================================================================
--- e2fsprogs-1.39.orig/lib/ext2fs/mkjournal.c
+++ e2fsprogs-1.39/lib/ext2fs/mkjournal.c
@@ -308,6 +308,57 @@ errcode_t ext2fs_add_journal_device(ext2
}
/*
+ * Determine the number of journal blocks to use, either via
+ * user-specified # of megabytes, or via some intelligently selected
+ * defaults.
+ *
+ * Find a reasonable journal file size (in blocks) given the number of blocks
+ * in the filesystem. For very small filesystems, it is not reasonable to
+ * have a journal that fills more than half of the filesystem.
+ */
+int ext2fs_figure_journal_size(int size, ext2_filsys fs)
+{
+ blk_t j_blocks;
+
+ if (fs->super->s_blocks_count < 2048) {
+ fputs(("\nFilesystem too small for a journal\n"), stderr);
+ return 0;
+ }
+
+ if (size > 0) {
+ j_blocks = size * 1024 / (fs->blocksize / 1024);
+ if (j_blocks < 1024 || j_blocks > 102400) {
+ fprintf(stderr, ("\nThe requested journal "
+ "size is %d blocks; it must be\n"
+ "between 1024 and 102400 blocks. "
+ "Aborting.\n"),
+ j_blocks);
+ return -ERANGE;
+ }
+ if (j_blocks > fs->super->s_free_blocks_count ||
+ j_blocks > fs->super->s_blocks_count / 2) {
+ fputs(("\nJournal size too big for filesystem.\n"),
+ stderr);
+ return -EFBIG;
+ }
+ return j_blocks;
+ }
+
+ if (fs->super->s_blocks_count < 32768)
+ j_blocks = 1024;
+ else if (fs->super->s_blocks_count < 256*1024)
+ j_blocks = 4096;
+ else if (fs->super->s_blocks_count < 512*1024)
+ j_blocks = 8192;
+ else if (fs->super->s_blocks_count < 1024*1024)
+ j_blocks = 16384;
+ else
+ j_blocks = 32768;
+
+ return j_blocks;
+}
+
+/*
* This function adds a journal inode to a filesystem, using either
* POSIX routines if the filesystem is mounted, or using direct I/O
* functions if it is not.
Index: e2fsprogs-1.39/misc/mke2fs.c
===================================================================
--- e2fsprogs-1.39.orig/misc/mke2fs.c
+++ e2fsprogs-1.39/misc/mke2fs.c
@@ -1649,8 +1649,10 @@ int main (int argc, char *argv[])
} else if ((journal_size) ||
(fs_param.s_feature_compat &
EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
- journal_blocks = figure_journal_size(journal_size, fs);
+ journal_blocks = ext2fs_figure_journal_size(journal_size, fs);
+ if (journal_blocks < 0)
+ exit(1);
if (!journal_blocks) {
fs->super->s_feature_compat &=
~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
Index: e2fsprogs-1.39/misc/tune2fs.c
===================================================================
--- e2fsprogs-1.39.orig/misc/tune2fs.c
+++ e2fsprogs-1.39/misc/tune2fs.c
@@ -417,8 +417,10 @@ static void add_journal(ext2_filsys fs)
} else if (journal_size) {
fputs(_("Creating journal inode: "), stdout);
fflush(stdout);
- journal_blocks = figure_journal_size(journal_size, fs);
+ journal_blocks = ext2fs_figure_journal_size(journal_size, fs);
+ if (journal_blocks < 0)
+ exit(1);
retval = ext2fs_add_journal_inode(fs, journal_blocks,
journal_flags);
if (retval) {
Index: e2fsprogs-1.39/misc/util.c
===================================================================
--- e2fsprogs-1.39.orig/misc/util.c
+++ e2fsprogs-1.39/misc/util.c
@@ -238,57 +238,6 @@ void parse_journal_opts(const char *opts
}
}
-/*
- * Determine the number of journal blocks to use, either via
- * user-specified # of megabytes, or via some intelligently selected
- * defaults.
- *
- * Find a reasonable journal file size (in blocks) given the number of blocks
- * in the filesystem. For very small filesystems, it is not reasonable to
- * have a journal that fills more than half of the filesystem.
- */
-int figure_journal_size(int size, ext2_filsys fs)
-{
- blk_t j_blocks;
-
- if (fs->super->s_blocks_count < 2048) {
- fputs(_("\nFilesystem too small for a journal\n"), stderr);
- return 0;
- }
-
- if (size > 0) {
- j_blocks = size * 1024 / (fs->blocksize / 1024);
- if (j_blocks < 1024 || j_blocks > 102400) {
- fprintf(stderr, _("\nThe requested journal "
- "size is %d blocks; it must be\n"
- "between 1024 and 102400 blocks. "
- "Aborting.\n"),
- j_blocks);
- exit(1);
- }
- if (j_blocks > fs->super->s_free_blocks_count) {
- fputs(_("\nJournal size too big for filesystem.\n"),
- stderr);
- exit(1);
- }
- return j_blocks;
- }
-
- if (fs->super->s_blocks_count < 32768)
- j_blocks = 1024;
- else if (fs->super->s_blocks_count < 256*1024)
- j_blocks = 4096;
- else if (fs->super->s_blocks_count < 512*1024)
- j_blocks = 8192;
- else if (fs->super->s_blocks_count < 1024*1024)
- j_blocks = 16384;
- else
- j_blocks = 32768;
-
-
- return j_blocks;
-}
-
void print_check_message(ext2_filsys fs)
{
printf(_("This filesystem will be automatically "
Index: e2fsprogs-1.39/misc/util.h
===================================================================
--- e2fsprogs-1.39.orig/misc/util.h
+++ e2fsprogs-1.39/misc/util.h
@@ -22,5 +22,4 @@ extern void proceed_question(void);
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 int figure_journal_size(int size, ext2_filsys fs);
extern void print_check_message(ext2_filsys fs);
Index: e2fsprogs-1.39/e2fsck/problem.c
===================================================================
--- e2fsprogs-1.39.orig/e2fsck/problem.c
+++ e2fsprogs-1.39/e2fsck/problem.c
@@ -1479,6 +1479,11 @@ static struct e2fsck_problem problem_tab
" +(%i--%j)",
PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+ /* Recreate journal if E2F_FLAG_JOURNAL_INODE flag is set */
+ { PR_6_RECREATE_JOURNAL,
+ N_("Recreate journal to make the filesystem ext3 again?\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
{ 0 }
};
Index: e2fsprogs-1.39/e2fsck/problem.h
===================================================================
--- e2fsprogs-1.39.orig/e2fsck/problem.h
+++ e2fsprogs-1.39/e2fsck/problem.h
@@ -892,6 +892,13 @@ struct problem_context {
#define PR_5_INODE_RANGE_USED 0x050017
/*
+ * Post-Pass 5 errors
+ */
+
+/* Recreate the journal if E2F_FLAG_JOURNAL_INODE flag is set */
+#define PR_6_RECREATE_JOURNAL 0x060000
+
+/*
* Function declarations
*/
int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx);
Thanks,
Kalpak.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: e2fsprogs-tests-f_badjour_indblks.patch --]
[-- Type: text/x-patch; name=e2fsprogs-tests-f_badjour_indblks.patch; charset=UTF-8, Size: 15208 bytes --]
Index: e2fsprogs-1.39/tests/f_badjour_indblks/expect.1
===================================================================
--- /dev/null
+++ e2fsprogs-1.39/tests/f_badjour_indblks/expect.1
@@ -0,0 +1,31 @@
+Superblock has an invalid ext3 journal (inode 8).
+Clear? yes
+
+*** ext3 journal has been deleted - filesystem is now ext2 only ***
+
+Pass 1: Checking inodes, blocks, and sizes
+Journal inode is not in use, but contains data. Clear? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -(82--1111)
+Fix? yes
+
+Free blocks count wrong for group #0 (7080, counted=8110).
+Fix? yes
+
+Free blocks count wrong (7080, counted=8110).
+Fix? yes
+
+Recreate journal to make the filesystem ext3 again?
+Fix? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been re-created - filesystem is now ext3 again ***
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/256 files (9.1% non-contiguous), 1112/8192 blocks
+Exit status is 1
Index: e2fsprogs-1.39/tests/f_badjour_indblks/expect.2
===================================================================
--- /dev/null
+++ e2fsprogs-1.39/tests/f_badjour_indblks/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/256 files (9.1% non-contiguous), 1112/8192 blocks
+Exit status is 0
Index: e2fsprogs-1.39/tests/f_badjour_indblks/name
===================================================================
--- /dev/null
+++ e2fsprogs-1.39/tests/f_badjour_indblks/name
@@ -0,0 +1 @@
+corruption in journal inode's indirect blocks
Index: e2fsprogs-1.39/tests/f_badjourblks/expect.1
===================================================================
--- e2fsprogs-1.39.orig/tests/f_badjourblks/expect.1
+++ e2fsprogs-1.39/tests/f_badjourblks/expect.1
@@ -19,7 +19,13 @@ Fix? yes
Free blocks count wrong (7112, counted=8142).
Fix? yes
+Recreate journal to make the filesystem ext3 again?
+Fix? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been re-created - filesystem is now ext3 again ***
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 11/256 files (0.0% non-contiguous), 50/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
Exit status is 1
Index: e2fsprogs-1.39/tests/f_badjourblks/expect.2
===================================================================
--- e2fsprogs-1.39.orig/tests/f_badjourblks/expect.2
+++ e2fsprogs-1.39/tests/f_badjourblks/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-test_filesys: 11/256 files (0.0% non-contiguous), 50/8192 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/8192 blocks
Exit status is 0
Index: e2fsprogs-1.39/tests/f_miss_journal/expect.1
===================================================================
--- e2fsprogs-1.39.orig/tests/f_miss_journal/expect.1
+++ e2fsprogs-1.39/tests/f_miss_journal/expect.1
@@ -17,7 +17,13 @@ Fix? yes
Free blocks count wrong (968, counted=1998).
Fix? yes
+Recreate journal to make the filesystem ext3 again?
+Fix? yes
+
+Creating journal (1024 blocks): Done.
+
+*** journal has been re-created - filesystem is now ext3 again ***
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 11/256 files (0.0% non-contiguous), 50/2048 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/2048 blocks
Exit status is 1
Index: e2fsprogs-1.39/tests/f_miss_journal/expect.2
===================================================================
--- e2fsprogs-1.39.orig/tests/f_miss_journal/expect.2
+++ e2fsprogs-1.39/tests/f_miss_journal/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-test_filesys: 11/256 files (0.0% non-contiguous), 50/2048 blocks
+test_filesys: 11/256 files (0.0% non-contiguous), 1080/2048 blocks
Exit status is 0
*** /dev/null 2007-03-15 00:26:50.565995286 +0530
--- e2fsprogs-1.39/tests/f_badjour_indblks/image.gz 2007-03-15 01:23:11.000000000 +0530
***************
*** 0 ****
--- 1 ----
+ \x1f\b\b\x01.ðE\x02\x03image\0ìÝuÔìuÀñç>÷ÒqéîP\x04IQIéînV@\x0eéNÅ\0\x05EB@J\x01\x05AAéF \x10N¥KJö}]P\ܳ{Ϊ»,¯×yÞ3¿ùß9óù|gþó\f\f\0\x1fXCjãº>còÞÞõ\x17Ó¼ÝÛ;OõÙ%FìXí!\x7fÞõçÛ+>õ»\x1aaÚ·æ®Á·÷Ï}êÑ7°ÔËyÖ¼W\x1e±èÞÃÿ9Ofê÷ì\x19õ]ÛgóÈ[ÃYtÓóϾb·½Ï=çáÁw=Ñ\x11ÏcÕ®W«ÕkZ³ÖªµkZ·Ö«õkÚ°6ú5÷\x13ï+ÓÕô5Ãùü¥?Ï+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0|мõ\x7fÆ>^\fø×Ú÷QÞ/ë\x03ðöÎ6ë³K¼Ó¿r\x01zj.ý½Ç\x1f:0ø®ã\x16·VóÏø\0ܯ9\r{ïûoÈÀÂÿÃû^å¿ûø\x03ãüÍ\f¾óøcú×ãVÕjõZ£Ö¬µjíZ§ÖõjýÚ 6¬x}ÿ+X\x7fæø{ëÏàÀ$ï:nÄÎ%k©Zº©ek¹Z¾V¨\x15k¥ZÙi\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0xß\x1a¬1\a\fÎöíÁÁÙº1FÛ\x0f\x1d}pívÜi-¶ÛyÛÍ+øÿfÿ0ÿ/\x0eý÷ù\a> 9\x05`þ\x01ó\x0f\x7fÀü\x03æ\x1f0ÿù\aÌ?`þ\x01ó\x0f¼_\f}{ \x18©F®QjÔ\x1aF\x1fxç7\x02\x03\x03cÕØ5¼Æ©qk¼\x1a¿&¨ k¢¸&©Ik²¼¦¨)kªº¦©izø_uùüó~ã¯ß\0½³9äíÞcîS¾ù¥\ö̳æ½òE÷\x1eþ\x1d\a\0\0\0\0\0\0\0\0\0\0\0üãlôöõƵImZ#þÕÏæµEmY©ÏÖVµumS«mk»ú|m_;ÔµSí\»Ô®µ[í^{Ô\x17jÏÚ«ö®}jßÚ¯ö¯\x03êÀ:¨\x0e®CêÐ:¬\x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x066\x1e\x1c\x18Ød¨s\x01\x1f4^[7ÿÔ¦µYm^[ÔõúlmU[×6õ¹Ú¶¶«Ï×öµCíX;ÕεKíZ»ÕîµG}¡ö¬½jïÚ§öýjÿ: \x0e¬êà:¤\x0eÃêð:¢¬£êõ¥:º¾\_©¯Ö×ê:¶¾^ߨãêøúf}«N¨o×uR\§ÔwêÔ:N¯ïÖ\x19ufUg×9õ½ú~[çÕùõúa]P\x17Öꢺ¸~\?©KêÒúiý¬.«Ë뺲®ª«ëº¶®«ë뺱nªëçõº¥nÛêöúeýª~]wÔuWÝ]¿©{êÞúmý®î«ûëz°\x1eªëz´\x1e«Çëz²~_\x7f¨§êéz¦çêùz¡^¬êåz¥þX¯Ökõz½QoÖê\x1aèsgH\rÖÐ\x1aV#ÕÈ5JZ£Õè5FYcÕØ5¼Æ©qk¼\x1a¿&¨ k¢¸&©Ik²¼¦¨)kªº¦©ikº¾f¨\x19ëCõá©>R3×,õѵf«Ùk³æªÕÜõñúD}²æ©yk¾¿\x16¨\x05ëSµP-\Ô¢µX-^KÔµT-]ËÔ²µ\-_+ÔµR\«ÔªµZ^kÔµV]ëÔºµ^_^[ÔµQ}zÐú\a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0¼×&\x03\x03ÖfµymQ[Ögê³µUm]ÛÔçjÛÚ®>_Û×\x0eµcíT;×.µkíV»×\x1eõ
Ú³öª½kÚ·ö«ýë:°\x0eªë:´\x0e«Ãë:²ª/Öêèúr}¥¾Z_«cêØúz}£«ãëõ:¡¾]'ÖIurRß©Së´:½¾[gÔuV]çÔ÷êûunWç×\x0fêuA]X?ªêâúqý¤.©Kë§õ³º¬.¯+êʺª®®kêÚº®®¯^[êÆº©n®×/꺵n«Ûëõ«úuÝQwÖ]uwý¦î©{ë·õ»º¯î¯\aêÁz¨\x1e®GêÑz¬\x1e¯'êÉú}ý¡ª§ëz¶«çë
z±^ªëúc½Z¯ÕëõF½Y\x7fª·j`èÀÀ\x1a¬¡5¬Fªk\x1aµF«Ñk\x1a³Æª±kxSãÖx5~MP\x13ÖD5qMRÖd5yMQSÖT5uMSÓÖt5}ÍP3ÖêÃ5S}¤f®Yê£5kÍV³×\x1c5gÍU\x1f«¹ëãõúdÍSóÖ|5\x7f-P\vÖ§j¡Z¸\x16©Ek±Z¼¨%k©Zº©ek¹Z¾V¨\x15k¥Z¹V©UkµZ½Ö¨5kZ»Ö©uk½Z¿6¨\rk£útm<Ôú\a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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alink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] e2fsprogs: Check journal inode sanity and recreate journal
2007-03-14 21:13 [PATCH] e2fsprogs: Check journal inode sanity and recreate journal Kalpak Shah
@ 2007-05-08 5:40 ` Theodore Tso
2007-05-24 21:22 ` Kalpak Shah
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Tso @ 2007-05-08 5:40 UTC (permalink / raw)
To: Kalpak Shah; +Cc: linux-ext4, Andreas Dilger
On Thu, Mar 15, 2007 at 02:43:47AM +0530, Kalpak Shah wrote:
> Index: e2fsprogs-1.39/lib/ext2fs/mkjournal.c
> ===================================================================
> --- e2fsprogs-1.39.orig/lib/ext2fs/mkjournal.c
> +++ e2fsprogs-1.39/lib/ext2fs/mkjournal.c
> + if (fs->super->s_blocks_count < 2048) {
> + fputs(("\nFilesystem too small for a journal\n"), stderr);
> + return 0;
> + }
Code in lib/ext2fs isn't allowed to do any output to stdio (except for
debugging purposes). It causes internationalization problems, and
it's just in general a bad idea for ext2fs library code to try to do
any UI.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] e2fsprogs: Check journal inode sanity and recreate journal
2007-05-08 5:40 ` Theodore Tso
@ 2007-05-24 21:22 ` Kalpak Shah
0 siblings, 0 replies; 3+ messages in thread
From: Kalpak Shah @ 2007-05-24 21:22 UTC (permalink / raw)
To: Theodore Tso; +Cc: linux-ext4, Andreas Dilger, Eric Sandeen
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
On Tue, 2007-05-08 at 01:40 -0400, Theodore Tso wrote:
> On Thu, Mar 15, 2007 at 02:43:47AM +0530, Kalpak Shah wrote:
> > Index: e2fsprogs-1.39/lib/ext2fs/mkjournal.c
> > ===================================================================
> > --- e2fsprogs-1.39.orig/lib/ext2fs/mkjournal.c
> > +++ e2fsprogs-1.39/lib/ext2fs/mkjournal.c
> > + if (fs->super->s_blocks_count < 2048) {
> > + fputs(("\nFilesystem too small for a journal\n"), stderr);
> > + return 0;
> > + }
>
> Code in lib/ext2fs isn't allowed to do any output to stdio (except for
> debugging purposes). It causes internationalization problems, and
> it's just in general a bad idea for ext2fs library code to try to do
> any UI.
>
> - Ted
Hi Ted,
I have reworked the patch to make sure that lib/ext2fs does not do any
output. Added that to my mistakes-not-to-be-made-again list.
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Thanks,
Kalpak.
[-- Attachment #2: recreate-journal.patch --]
[-- Type: text/x-patch, Size: 11651 bytes --]
Index: e2fsprogs-1.40/e2fsck/journal.c
===================================================================
--- e2fsprogs-1.40.orig/e2fsck/journal.c
+++ e2fsprogs-1.40/e2fsck/journal.c
@@ -206,6 +206,7 @@ static errcode_t e2fsck_get_journal(e2fs
int ext_journal = 0;
int tried_backup_jnl = 0;
int i;
+ blk_t lblock;
clear_problem_context(&pctx);
@@ -283,6 +284,13 @@ static errcode_t e2fsck_get_journal(e2fs
goto try_backup_journal;
}
}
+ if (tried_backup_jnl && !(ctx->options & E2F_OPT_READONLY)) {
+ retval = ext2fs_write_inode(ctx->fs, sb->s_journal_inum,
+ &j_inode->i_ext2);
+ if (retval)
+ goto errout;
+ }
+
journal->j_maxlen = j_inode->i_ext2.i_size / journal->j_blocksize;
#ifdef USE_INODE_IO
@@ -299,6 +307,20 @@ static errcode_t e2fsck_get_journal(e2fs
if ((retval = journal_bmap(journal, 0, &start)) != 0)
goto errout;
#endif
+ for (lblock = 0; lblock < j_inode->i_ext2.i_size /
+ journal->j_blocksize; lblock++) {
+ blk_t pblock;
+
+ if ((retval = journal_bmap(journal, lblock,
+ &pblock)) != 0) {
+ goto errout;
+ }
+ if (pblock == 0 || pblock < sb->s_first_data_block ||
+ pblock >= sb->s_blocks_count) {
+ retval = EXT2_ET_BAD_BLOCK_NUM;
+ goto errout;
+ }
+ }
} else {
ext_journal = 1;
if (!ctx->journal_name) {
@@ -418,7 +440,7 @@ static errcode_t e2fsck_journal_fix_bad_
"filesystem is now ext2 only ***\n\n");
sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
sb->s_journal_inum = 0;
- ctx->flags |= E2F_FLAG_JOURNAL_INODE; /* FIXME: todo */
+ ctx->flags |= E2F_FLAG_JOURNAL_INODE;
e2fsck_clear_recover(ctx, 1);
return 0;
}
Index: e2fsprogs-1.40/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.40.orig/e2fsck/unix.c
+++ e2fsprogs-1.40/e2fsck/unix.c
@@ -849,6 +849,7 @@ int main (int argc, char *argv[])
e2fsck_t ctx;
struct problem_context pctx;
int flags, run_result;
+ int journal_size;
clear_problem_context(&pctx);
#ifdef MTRACE
@@ -1143,8 +1144,47 @@ restart:
" but we'll try to go on...\n"));
}
+ /*
+ * Save the journal size in megabytes.
+ * Try and use the journal size from the backup else let e2fsck
+ * find the default journal size.
+ */
+ if (sb->s_jnl_backup_type == EXT3_JNL_BACKUP_BLOCKS)
+ journal_size = sb->s_jnl_blocks[16] >> 20;
+ else
+ journal_size = -1;
+
run_result = e2fsck_run(ctx);
e2fsck_clear_progbar(ctx);
+
+ if (ctx->flags & E2F_FLAG_JOURNAL_INODE) {
+ if (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &pctx)) {
+ retval = ext2fs_figure_journal_size(&journal_size, fs);
+
+ if (journal_size && retval) {
+ fs->super->s_feature_compat &=
+ ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ com_err("Error ", retval, _("\n\twhile "
+ "trying to create journal file"));
+ goto no_journal;
+ }
+ printf(_("Creating journal (%d blocks): "),
+ journal_size);
+ fflush(stdout);
+ retval = ext2fs_add_journal_inode(fs,
+ journal_size, 0);
+ if (retval) {
+ com_err("Error ", retval,
+ _("\n\twhile trying to create journal"));
+ goto no_journal;
+ }
+ printf(_(" Done.\n"));
+ printf(_("\n*** journal has been re-created - "
+ "filesystem is now ext3 again ***\n"));
+ }
+ }
+no_journal:
+
if (run_result == E2F_FLAG_RESTART) {
printf(_("Restarting e2fsck from the beginning...\n"));
retval = e2fsck_reset_context(ctx);
Index: e2fsprogs-1.40/lib/ext2fs/ext2fs.h
===================================================================
--- e2fsprogs-1.40.orig/lib/ext2fs/ext2fs.h
+++ e2fsprogs-1.40/lib/ext2fs/ext2fs.h
@@ -879,6 +879,8 @@ extern errcode_t ext2fs_add_journal_devi
ext2_filsys journal_dev);
extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t size,
int flags);
+extern int ext2fs_figure_journal_size(int *size, ext2_filsys fs);
+
/* openfs.c */
extern errcode_t ext2fs_open(const char *name, int flags, int superblock,
Index: e2fsprogs-1.40/lib/ext2fs/mkjournal.c
===================================================================
--- e2fsprogs-1.40.orig/lib/ext2fs/mkjournal.c
+++ e2fsprogs-1.40/lib/ext2fs/mkjournal.c
@@ -308,6 +308,51 @@ errcode_t ext2fs_add_journal_device(ext2
}
/*
+ * Determine the number of journal blocks to use, either via
+ * user-specified # of megabytes, or via some intelligently selected
+ * defaults.
+ *
+ * Find a reasonable journal file size (in blocks) given the number of blocks
+ * in the filesystem. For very small filesystems, it is not reasonable to
+ * have a journal that fills more than half of the filesystem.
+ */
+int ext2fs_figure_journal_size(int *size, ext2_filsys fs)
+{
+ blk_t j_blocks;
+
+ if (fs->super->s_blocks_count < 2048)
+ return EXT2_ET_JOURNAL_FS_TOO_SMALL;
+
+ if (*size > 0) {
+ j_blocks = (*size) * 1024 / (fs->blocksize / 1024);
+ if (j_blocks < 1024 || j_blocks > 102400)
+ return EXT2_ET_JOURNAL_INVALID_SIZE;
+
+ if (j_blocks > fs->super->s_free_blocks_count ||
+ j_blocks > fs->super->s_blocks_count / 2)
+ return EXT2_ET_JOURNAL_TOO_BIG;
+
+ *size = j_blocks;
+ return 0;
+ }
+
+ if (fs->super->s_blocks_count < 32768)
+ j_blocks = 1024;
+ else if (fs->super->s_blocks_count < 256*1024)
+ j_blocks = 4096;
+ else if (fs->super->s_blocks_count < 512*1024)
+ j_blocks = 8192;
+ else if (fs->super->s_blocks_count < 1024*1024)
+ j_blocks = 16384;
+ else
+ j_blocks = 32768;
+
+ *size = j_blocks;
+
+ return 0;
+}
+
+/*
* This function adds a journal inode to a filesystem, using either
* POSIX routines if the filesystem is mounted, or using direct I/O
* functions if it is not.
Index: e2fsprogs-1.40/misc/mke2fs.c
===================================================================
--- e2fsprogs-1.40.orig/misc/mke2fs.c
+++ e2fsprogs-1.40/misc/mke2fs.c
@@ -1691,19 +1691,24 @@ int main (int argc, char *argv[])
} else if ((journal_size) ||
(fs_param.s_feature_compat &
EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
- journal_blocks = figure_journal_size(journal_size, fs);
+ retval = ext2fs_figure_journal_size(&journal_size, fs);
- if (!journal_blocks) {
+ if (journal_size && retval) {
+ com_err(program_name, retval,
+ _("\n\twhile trying to create journal file"));
+ exit(1);
+ }
+ if (!journal_size) {
fs->super->s_feature_compat &=
~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
goto no_journal;
}
if (!quiet) {
printf(_("Creating journal (%d blocks): "),
- journal_blocks);
+ journal_size);
fflush(stdout);
}
- retval = ext2fs_add_journal_inode(fs, journal_blocks,
+ retval = ext2fs_add_journal_inode(fs, journal_size,
journal_flags);
if (retval) {
com_err (program_name, retval,
Index: e2fsprogs-1.40/misc/tune2fs.c
===================================================================
--- e2fsprogs-1.40.orig/misc/tune2fs.c
+++ e2fsprogs-1.40/misc/tune2fs.c
@@ -373,7 +373,6 @@ static void update_feature_set(ext2_fils
*/
static void add_journal(ext2_filsys fs)
{
- unsigned long journal_blocks;
errcode_t retval;
ext2_filsys jfs;
io_manager io_ptr;
@@ -417,9 +416,14 @@ static void add_journal(ext2_filsys fs)
} else if (journal_size) {
fputs(_("Creating journal inode: "), stdout);
fflush(stdout);
- journal_blocks = figure_journal_size(journal_size, fs);
+ retval = ext2fs_figure_journal_size(&journal_size, fs);
- retval = ext2fs_add_journal_inode(fs, journal_blocks,
+ if (journal_size && retval) {
+ com_err(program_name, retval,
+ _("\n\twhile trying to create journal file"));
+ exit(1);
+ }
+ retval = ext2fs_add_journal_inode(fs, journal_size,
journal_flags);
if (retval) {
fprintf(stderr, "\n");
Index: e2fsprogs-1.40/misc/util.c
===================================================================
--- e2fsprogs-1.40.orig/misc/util.c
+++ e2fsprogs-1.40/misc/util.c
@@ -238,57 +238,6 @@ void parse_journal_opts(const char *opts
}
}
-/*
- * Determine the number of journal blocks to use, either via
- * user-specified # of megabytes, or via some intelligently selected
- * defaults.
- *
- * Find a reasonable journal file size (in blocks) given the number of blocks
- * in the filesystem. For very small filesystems, it is not reasonable to
- * have a journal that fills more than half of the filesystem.
- */
-int figure_journal_size(int size, ext2_filsys fs)
-{
- blk_t j_blocks;
-
- if (fs->super->s_blocks_count < 2048) {
- fputs(_("\nFilesystem too small for a journal\n"), stderr);
- return 0;
- }
-
- if (size > 0) {
- j_blocks = size * 1024 / (fs->blocksize / 1024);
- if (j_blocks < 1024 || j_blocks > 102400) {
- fprintf(stderr, _("\nThe requested journal "
- "size is %d blocks; it must be\n"
- "between 1024 and 102400 blocks. "
- "Aborting.\n"),
- j_blocks);
- exit(1);
- }
- if (j_blocks > fs->super->s_free_blocks_count) {
- fputs(_("\nJournal size too big for filesystem.\n"),
- stderr);
- exit(1);
- }
- return j_blocks;
- }
-
- if (fs->super->s_blocks_count < 32768)
- j_blocks = 1400;
- else if (fs->super->s_blocks_count < 256*1024)
- j_blocks = 4096;
- else if (fs->super->s_blocks_count < 512*1024)
- j_blocks = 8192;
- else if (fs->super->s_blocks_count < 1024*1024)
- j_blocks = 16384;
- else
- j_blocks = 32768;
-
-
- return j_blocks;
-}
-
void print_check_message(ext2_filsys fs)
{
printf(_("This filesystem will be automatically "
Index: e2fsprogs-1.40/misc/util.h
===================================================================
--- e2fsprogs-1.40.orig/misc/util.h
+++ e2fsprogs-1.40/misc/util.h
@@ -22,5 +22,4 @@ extern void proceed_question(void);
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 int figure_journal_size(int size, ext2_filsys fs);
extern void print_check_message(ext2_filsys fs);
Index: e2fsprogs-1.40/e2fsck/problem.c
===================================================================
--- e2fsprogs-1.40.orig/e2fsck/problem.c
+++ e2fsprogs-1.40/e2fsck/problem.c
@@ -1489,6 +1489,11 @@ static struct e2fsck_problem problem_tab
" +(%i--%j)",
PROMPT_NONE, PR_LATCH_IBITMAP | PR_PREEN_OK | PR_PREEN_NOMSG },
+ /* Recreate journal if E2F_FLAG_JOURNAL_INODE flag is set */
+ { PR_6_RECREATE_JOURNAL,
+ N_("Recreate journal to make the filesystem ext3 again?\n"),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
{ 0 }
};
Index: e2fsprogs-1.40/e2fsck/problem.h
===================================================================
--- e2fsprogs-1.40.orig/e2fsck/problem.h
+++ e2fsprogs-1.40/e2fsck/problem.h
@@ -898,6 +898,13 @@ struct problem_context {
#define PR_5_INODE_RANGE_USED 0x050017
/*
+ * Post-Pass 5 errors
+ */
+
+/* Recreate the journal if E2F_FLAG_JOURNAL_INODE flag is set */
+#define PR_6_RECREATE_JOURNAL 0x060000
+
+/*
* Function declarations
*/
int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx);
Index: e2fsprogs-1.40/lib/ext2fs/ext2_err.et.in
===================================================================
--- e2fsprogs-1.40.orig/lib/ext2fs/ext2_err.et.in
+++ e2fsprogs-1.40/lib/ext2fs/ext2_err.et.in
@@ -275,6 +275,15 @@ ec EXT2_ET_LOAD_EXT_JOURNAL,
ec EXT2_ET_NO_JOURNAL,
"Journal not found"
+ec EXT2_ET_JOURNAL_FS_TOO_SMALL,
+ "Filesystem too small for a journal"
+
+ec EXT2_ET_JOURNAL_TOO_BIG,
+ "Journal size too big for filesystem"
+
+ec EXT2_ET_JOURNAL_INVALID_SIZE,
+ "The journal size must be between 1024 and 102400 blocks."
+
ec EXT2_ET_DIRHASH_UNSUPP,
"Directory hash unsupported"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-24 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-14 21:13 [PATCH] e2fsprogs: Check journal inode sanity and recreate journal Kalpak Shah
2007-05-08 5:40 ` Theodore Tso
2007-05-24 21:22 ` Kalpak Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).