Re: external journal lost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2 Apr 2009, Felix Resch wrote:
> Thouh i am still unclear about the semantics of the 'force' flag of 
> tune2fs.

Hm, I never had to forcefully remove a journal (yet), but from reading the 
manpage I'd indeed expect to get this removed even if the filesystem is in 
error. The attached patch to e2fsprogs (latest git) makes tune2fs removing 
the journal when "-f" is supplied. And it seems to work so far:

http://nerdbynature.de/bits/tune2fs/

Comments?

Christian.
-- 
Anyone who makes love to Bruce Schneier discovers a 0-day flaw in a crypto
protocol the next day.
--- e2fsprogs-git/misc/tune2fs.c.ORIG	2009-04-02 22:40:58.740218188 +0200
+++ e2fsprogs-git/misc/tune2fs.c	2009-04-02 22:42:37.221830335 +0200
@@ -374,8 +374,8 @@ static void update_feature_set(ext2_fils
 				"read-only.\n"), stderr);
 			exit(1);
 		}
-		if (sb->s_feature_incompat &
-		    EXT3_FEATURE_INCOMPAT_RECOVER) {
+		if ((sb->s_feature_incompat &
+		    EXT3_FEATURE_INCOMPAT_RECOVER) && (!f_flag)) {
 			fputs(_("The needs_recovery flag is set.  "
 				"Please run e2fsck before clearing\n"
 				"the has_journal flag.\n"), stderr);
_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux