From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfs_repair: fix agf limit error messages
Date: Tue, 19 Apr 2016 16:29:24 -0400 [thread overview]
Message-ID: <57169524.30307@redhat.com> (raw)
Today we see errors like
"fllast 118 in agf 94 too large (max = 118)"
which makes no sense.
If we are erroring on X >= Y, Y is clearly not the
maximum allowable value.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/repair/agheader.c b/repair/agheader.c
index bd11ac2..b95cedd 100644
--- a/repair/agheader.c
+++ b/repair/agheader.c
@@ -94,7 +94,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_t *agf, xfs_agnumber_t i)
if (be32_to_cpu(agf->agf_flfirst) >= XFS_AGFL_SIZE(mp)) {
do_warn(_("flfirst %d in agf %d too large (max = %zu)\n"),
be32_to_cpu(agf->agf_flfirst),
- i, XFS_AGFL_SIZE(mp));
+ i, XFS_AGFL_SIZE(mp) - 1);
if (!no_modify)
agf->agf_flfirst = cpu_to_be32(0);
}
@@ -102,7 +102,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_t *agf, xfs_agnumber_t i)
if (be32_to_cpu(agf->agf_fllast) >= XFS_AGFL_SIZE(mp)) {
do_warn(_("fllast %d in agf %d too large (max = %zu)\n"),
be32_to_cpu(agf->agf_fllast),
- i, XFS_AGFL_SIZE(mp));
+ i, XFS_AGFL_SIZE(mp) - 1);
if (!no_modify)
agf->agf_fllast = cpu_to_be32(0);
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
reply other threads:[~2016-04-19 20:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=57169524.30307@redhat.com \
--to=sandeen@redhat.com \
--cc=xfs@oss.sgi.com \
/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