linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 4/5] e2fsck: add the max_count_problems setting in e2fsck.conf
Date: Sun, 18 Mar 2012 15:52:47 -0400	[thread overview]
Message-ID: <1332100368-2683-5-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1332100368-2683-1-git-send-email-tytso@mit.edu>

Also add appropriate documentation for options/max_count_problems and
problems/0xXXXXXX/max_count settings in /etc/e2fsck.conf

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 e2fsck/e2fsck.conf.5.in |   12 ++++++++++++
 e2fsck/problem.c        |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in
index 2a600d0..a89d7b4 100644
--- a/e2fsck/e2fsck.conf.5.in
+++ b/e2fsck/e2fsck.conf.5.in
@@ -136,6 +136,13 @@ filesystem checks (either based on time or number of mounts) should
 be doubled if the system is running on battery.  This setting defaults to 
 true.
 .TP
+.I max_count_problems
+This relation specifies the maximum number of problem reports of a
+particular type will be printed to stdout before further problem reports
+of that type are squelched.  This can be useful if the console is slow
+(i.e., connected to a serial port) and so a large amount of output could
+end up delaying the boot process for a long time (potentially hours).
+.TP
 .I indexed_dir_slack_percentage
 When
 .BR e2fsck (8)
@@ -171,6 +178,11 @@ whether this filesystem problem should be automatically fixed when
 .B e2fsck
 is running in preen mode.
 .TP
+.I max_count
+This integer relation overrides the 
+.I max_count_problems
+parameter (set in the options section) for this particular problem.
+.TP
 .I no_ok
 This boolean relation overrides the default behavior determining
 whether or not the filesystem will be marked as inconsistent if the user
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index 7d5b10d..06eb179 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -1824,6 +1824,9 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
 		reconfigure_bool(ctx, ptr, key, PR_NO_NOMSG, "no_nomsg");
 		reconfigure_bool(ctx, ptr, key, PR_PREEN_NOHDR, "preen_noheader");
 		reconfigure_bool(ctx, ptr, key, PR_FORCE_NO, "force_no");
+		profile_get_integer(ctx->profile, "options",
+				    "max_count_problems", 0, 0,
+				    &ptr->max_count);
 		profile_get_integer(ctx->profile, "problems", key, "max_count",
 				    ptr->max_count, &ptr->max_count);
 
-- 
1.7.9.107.g97f9a


  parent reply	other threads:[~2012-03-18 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-18 19:52 [PATCH 0/5] e2fsck logging improvements Theodore Ts'o
2012-03-18 19:52 ` [PATCH 1/5] e2fsck: add support for field widths in messages using %-expansion Theodore Ts'o
2012-03-18 19:52 ` [PATCH 2/5] e2fsck: print the current and expected block group checksums Theodore Ts'o
2012-03-18 19:52 ` [PATCH 3/5] e2fsck: print a notice when we've started suppressing a problem code Theodore Ts'o
2012-03-18 23:17   ` Andreas Dilger
2012-03-19  0:25     ` Ted Ts'o
2012-03-19 22:43       ` Andreas Dilger
2012-03-18 19:52 ` Theodore Ts'o [this message]
2012-03-18 19:52 ` [PATCH 5/5] e2fsck: add logging capability Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332100368-2683-5-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).