diff mbox

ext4: Don't warn about mnt_count after the first mount of a new mkfsed volume.

Message ID 1305557603-4596-1-git-send-email-tm@tao.ma
State Accepted, archived
Headers show

Commit Message

Tao Ma May 16, 2011, 2:53 p.m. UTC
From: Tao Ma <boyu.mt@taobao.com>

Currently, if we mkfs a new ext4 volume and mount it for the first time,
we will get the warning in the message like
warning: maximal mount count reached, running e2fsck is recommended

It is really misleading. So change the check so that it wouldn't warn in that case.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
 fs/ext4/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Theodore Ts'o May 18, 2011, 5:33 p.m. UTC | #1
On Mon, May 16, 2011 at 10:53:23PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> Currently, if we mkfs a new ext4 volume and mount it for the first time,
> we will get the warning in the message like
> warning: maximal mount count reached, running e2fsck is recommended
> 
> It is really misleading. So change the check so that it wouldn't warn in that case.
> 
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Added to the ext4 tree, thanks!

						- Ted
--
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
diff mbox

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e29535c..92166b7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1900,7 +1900,7 @@  static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
 		ext4_msg(sb, KERN_WARNING,
 			 "warning: mounting fs with errors, "
 			 "running e2fsck is recommended");
-	else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 &&
+	else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 &&
 		 le16_to_cpu(es->s_mnt_count) >=
 		 (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count))
 		ext4_msg(sb, KERN_WARNING,