The boolean options "force_no" in the problems stanza of e2fsck.conf
allows a particular problem code be treated as if the user will answer
"no" to the question of whether a particular problem should be fixed
--- even if e2fsck is run with the -y option.
As an example use case, suppose a distribution had widely deployed a
version of the kernel where under some circumstances, the EOFBLOCKS_FL
flag would be left set even though it should not be left set, and a
customer had a workload which exercised the fencepost error all the
time, resulting in many large number of inodes that had EOFBLOCKS_FL
set erroneously. Enough, in fact, the e2fsck runs were taking too
long. (There was such a bug in the kernel, which was fixed by commit
58590b06d in 2.6.36).
Leaving EOFBLOCKS_FL set when it should not be isn't a huge deal, and
is certainly than having high availability timeout alerts going off
left and right. So in this case, the best fix might be to put the
following in /etc/e2fsck.conf:
[problems]
0x010060 = { # PR_1_EOFBLOCKS_FL_SET
force_no = true
no_ok = true
no_nomsg = true
}
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
.I no_nomsg
This boolean relation overrides the default behavior controlling
whether or not the description for this filesystem problem should
-be suppressed when
+be suppressed when a problem forced not to be fixed, either because
.B e2fsck
is run with the
.B -n
-option.
+option or because the
+.I force_no
+flag has been set for the problem.
+.TP
+.I force_no
+This boolean option, if set to true, forces a problem to never be fixed.
+That is, it will be as if the user problem responds 'no' to the question
+of 'should this problem be fixed?'. The
+.I force_no
+option even overrides the
+.B -y
+option given on the command-line (just for the specific problem, of course).
.SH THE [scratch_files] STANZA
The following relations are defined in the
.I [scratch_files]
reconfigure_bool(ctx, ptr, key, PR_NOCOLLATE, "no_collate");
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");
ptr->flags |= PR_CONFIG;
}
(ctx->options & E2F_OPT_PREEN))
suppress++;
if ((ptr->flags & PR_NO_NOMSG) &&
- (ctx->options & E2F_OPT_NO))
+ ((ctx->options & E2F_OPT_NO) || (ptr->flags & PR_FORCE_NO)))
suppress++;
if (!suppress) {
message = ptr->e2p_description;
else
answer = def_yn;
} else {
- if (ctx->options & E2F_OPT_PREEN) {
+ if (ptr->flags & PR_FORCE_NO) {
+ answer = 0;
+ if (!suppress)
+ print_answer = 1;
+ } else if (ctx->options & E2F_OPT_PREEN) {
answer = def_yn;
if (!(ptr->flags & PR_PREEN_NOMSG))
print_answer = 1;
#define PR_PREEN_NOHDR 0x040000 /* Don't print the preen header */
#define PR_CONFIG 0x080000 /* This problem has been customized
from the config file */
+#define PR_FORCE_NO 0x100000 /* Force the answer to be no */