* [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed @ 2011-11-01 2:06 Eryu Guan 2011-11-01 22:43 ` Jan Kara 0 siblings, 1 reply; 4+ messages in thread From: Eryu Guan @ 2011-11-01 2:06 UTC (permalink / raw) To: linux-ext4; +Cc: Eryu Guan, Jan Kara Call ext3_mark_recovery_complete() in ext3_fill_super() only if needs_recovery is non-zero. Besides that, print out "recovery complete" message after calling ext3_mark_recovery_complete(). Cc: Jan Kara <jack@suse.cz> Signed-off-by: Eryu Guan <guaneryu@gmail.com> --- fs/ext3/super.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 7beb69a..2681e0d 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -2060,9 +2060,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; ext3_orphan_cleanup(sb, es); EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS; - if (needs_recovery) + if (needs_recovery) { + ext3_mark_recovery_complete(sb, es); ext3_msg(sb, KERN_INFO, "recovery complete"); - ext3_mark_recovery_complete(sb, es); + } ext3_msg(sb, KERN_INFO, "mounted filesystem with %s data mode", test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal": test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": -- 1.7.7.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed 2011-11-01 2:06 [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed Eryu Guan @ 2011-11-01 22:43 ` Jan Kara 2011-11-02 14:04 ` Eryu Guan 0 siblings, 1 reply; 4+ messages in thread From: Jan Kara @ 2011-11-01 22:43 UTC (permalink / raw) To: Eryu Guan; +Cc: linux-ext4, Jan Kara On Tue 01-11-11 10:06:19, Eryu Guan wrote: > Call ext3_mark_recovery_complete() in ext3_fill_super() only if > needs_recovery is non-zero. > > Besides that, print out "recovery complete" message after calling > ext3_mark_recovery_complete(). OK, I don't see a problem in this patch. But is there some benefit in it? I'm slightly nervous it could change something subtle... Honza > > Cc: Jan Kara <jack@suse.cz> > Signed-off-by: Eryu Guan <guaneryu@gmail.com> > --- > fs/ext3/super.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/ext3/super.c b/fs/ext3/super.c > index 7beb69a..2681e0d 100644 > --- a/fs/ext3/super.c > +++ b/fs/ext3/super.c > @@ -2060,9 +2060,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) > EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; > ext3_orphan_cleanup(sb, es); > EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS; > - if (needs_recovery) > + if (needs_recovery) { > + ext3_mark_recovery_complete(sb, es); > ext3_msg(sb, KERN_INFO, "recovery complete"); > - ext3_mark_recovery_complete(sb, es); > + } > ext3_msg(sb, KERN_INFO, "mounted filesystem with %s data mode", > test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal": > test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": > -- > 1.7.7.1 > -- Jan Kara <jack@suse.cz> SUSE Labs, CR ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed 2011-11-01 22:43 ` Jan Kara @ 2011-11-02 14:04 ` Eryu Guan 2011-11-03 1:35 ` Jan Kara 0 siblings, 1 reply; 4+ messages in thread From: Eryu Guan @ 2011-11-02 14:04 UTC (permalink / raw) To: Jan Kara; +Cc: linux-ext4 On Wed, Nov 2, 2011 at 6:43 AM, Jan Kara <jack@suse.cz> wrote: > On Tue 01-11-11 10:06:19, Eryu Guan wrote: >> Call ext3_mark_recovery_complete() in ext3_fill_super() only if >> needs_recovery is non-zero. >> >> Besides that, print out "recovery complete" message after calling >> ext3_mark_recovery_complete(). > OK, I don't see a problem in this patch. But is there some benefit in it? > I'm slightly nervous it could change something subtle... I think current code may confuse people. The variable 'needs_recovery' in ext3_fill_super() only be used in this 'if' switch, but all the 'if' does is printing out a log message and no matter what value 'needs_recovery' is, ext3_mark_recovery_complete() is always being called. This change makes the logic more clear and of course reduce a little overhead when mounting clean fs. This change also consists with ext4 counter part 3733 if (needs_recovery) { 3734 ext4_msg(sb, KERN_INFO, "recovery complete"); 3735 ext4_mark_recovery_complete(sb, es); 3736 } But, yes, current code exists for a long time and no one complains about it, the change is trivial. If people worry more, I'm fine with skipping this patch. Thanks. Eryu Guan > > Honza >> >> Cc: Jan Kara <jack@suse.cz> >> Signed-off-by: Eryu Guan <guaneryu@gmail.com> >> --- >> fs/ext3/super.c | 5 +++-- >> 1 files changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/fs/ext3/super.c b/fs/ext3/super.c >> index 7beb69a..2681e0d 100644 >> --- a/fs/ext3/super.c >> +++ b/fs/ext3/super.c >> @@ -2060,9 +2060,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) >> EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; >> ext3_orphan_cleanup(sb, es); >> EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS; >> - if (needs_recovery) >> + if (needs_recovery) { >> + ext3_mark_recovery_complete(sb, es); >> ext3_msg(sb, KERN_INFO, "recovery complete"); >> - ext3_mark_recovery_complete(sb, es); >> + } >> ext3_msg(sb, KERN_INFO, "mounted filesystem with %s data mode", >> test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal": >> test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": >> -- >> 1.7.7.1 >> > -- > Jan Kara <jack@suse.cz> > SUSE Labs, CR > -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed 2011-11-02 14:04 ` Eryu Guan @ 2011-11-03 1:35 ` Jan Kara 0 siblings, 0 replies; 4+ messages in thread From: Jan Kara @ 2011-11-03 1:35 UTC (permalink / raw) To: Eryu Guan; +Cc: Jan Kara, linux-ext4 On Wed 02-11-11 22:04:54, Eryu Guan wrote: > On Wed, Nov 2, 2011 at 6:43 AM, Jan Kara <jack@suse.cz> wrote: > > On Tue 01-11-11 10:06:19, Eryu Guan wrote: > >> Call ext3_mark_recovery_complete() in ext3_fill_super() only if > >> needs_recovery is non-zero. > >> > >> Besides that, print out "recovery complete" message after calling > >> ext3_mark_recovery_complete(). > > OK, I don't see a problem in this patch. But is there some benefit in it? > > I'm slightly nervous it could change something subtle... > > I think current code may confuse people. The variable 'needs_recovery' in > ext3_fill_super() only be used in this 'if' switch, but all the 'if' > does is printing > out a log message and no matter what value 'needs_recovery' is, > ext3_mark_recovery_complete() is always being called. > > This change makes the logic more clear and of course reduce a little overhead > when mounting clean fs. > > This change also consists with ext4 counter part > 3733 if (needs_recovery) { > 3734 ext4_msg(sb, KERN_INFO, "recovery complete"); > 3735 ext4_mark_recovery_complete(sb, es); > 3736 } OK, consistency with ext4 makes sense. I'll take the patch. Thanks. Honza > >> Cc: Jan Kara <jack@suse.cz> > >> Signed-off-by: Eryu Guan <guaneryu@gmail.com> > >> --- > >> fs/ext3/super.c | 5 +++-- > >> 1 files changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/fs/ext3/super.c b/fs/ext3/super.c > >> index 7beb69a..2681e0d 100644 > >> --- a/fs/ext3/super.c > >> +++ b/fs/ext3/super.c > >> @@ -2060,9 +2060,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) > >> EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; > >> ext3_orphan_cleanup(sb, es); > >> EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS; > >> - if (needs_recovery) > >> + if (needs_recovery) { > >> + ext3_mark_recovery_complete(sb, es); > >> ext3_msg(sb, KERN_INFO, "recovery complete"); > >> - ext3_mark_recovery_complete(sb, es); > >> + } > >> ext3_msg(sb, KERN_INFO, "mounted filesystem with %s data mode", > >> test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal": > >> test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": > >> -- > >> 1.7.7.1 > >> > > -- > > Jan Kara <jack@suse.cz> > > SUSE Labs, CR > > -- Jan Kara <jack@suse.cz> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-03 1:35 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-01 2:06 [PATCH] ext3: call ext3_mark_recovery_complete() when recovery is really needed Eryu Guan 2011-11-01 22:43 ` Jan Kara 2011-11-02 14:04 ` Eryu Guan 2011-11-03 1:35 ` Jan Kara
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).