public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "'linux-xfs@oss.sgi.com'" <linux-xfs@oss.sgi.com>
Subject: [PATCH] xfs_check: fix test for too-high level in v2 dir node
Date: Thu, 12 Sep 2013 16:00:23 -0500	[thread overview]
Message-ID: <52322B67.80305@redhat.com> (raw)

The test as it stands allows level == XFS_DA_NODE_MAXDEPTH (5),
but a max depth of 5 equates to level values of 0 through 4.

Level 5 would be a depth of 6.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/db/check.c b/db/check.c
index cbe55ba..d9e3e3f 100644
--- a/db/check.c
+++ b/db/check.c
@@ -3138,7 +3138,7 @@ process_leaf_node_dir_v2_int(
 	case XFS_DA_NODE_MAGIC:
 		node = iocur_top->data;
 		xfs_da3_node_hdr_from_disk(&nodehdr, node);
-		if (nodehdr.level < 1 || nodehdr.level > XFS_DA_NODE_MAXDEPTH) {
+		if (nodehdr.level < 1 || nodehdr.level >= XFS_DA_NODE_MAXDEPTH) {
 			if (!sflag || v)
 				dbprintf(_("bad node block level %d for dir ino "
 					 "%lld block %d\n"),

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2013-09-12 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 21:00 Eric Sandeen [this message]
2013-09-18 19:35 ` [PATCH] xfs_check: fix test for too-high level in v2 dir node Mark Tinguely
2013-09-18 20:20   ` Eric Sandeen
2013-09-18 20:55     ` Mark Tinguely
2013-09-23 13:36     ` Mark Tinguely

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=52322B67.80305@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-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