All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org, Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [PATCH] xfs_repair: initialize non-leaf finobt blocks with correct magic
Date: Thu, 24 Jan 2019 07:51:36 +1100	[thread overview]
Message-ID: <20190123205136.GM4205@dastard> (raw)
In-Reply-To: <20190123185929.46507-1-bfoster@redhat.com>

On Wed, Jan 23, 2019 at 01:59:29PM -0500, Brian Foster wrote:
> The free inode btree construction code in xfs_repair has a bug where
> any non-leaf nodes outside of the leftmost block at the associated
> level in the tree are incorrectly initialized with the inobt magic
> value. Update the prop_ino_cursor() path responsible for growing the
> non-leaf portion of the inode btrees to use the btnum of the
> specific tree being generated rather than the hardcoded inode btree
> type.
> 
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> Reported-by: Lucas Stach <l.stach@pengutronix.de>
> Root-caused-by: Lucas Stach <l.stach@pengutronix.de>

Looks fine, but one minor thing I noticed when looking at the other
cursor functions that handled different tree types was that they
assert the valid btnums at the start of the prop_?_cursor()
function. I note that build_ino_tree() has a similar assert:

	ASSERT(btnum == XFS_BTNUM_INO || btnum == XFS_BTNUM_FINO);

might be worth adding just for consistency with the rest of the
code?

Other than that,

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2019-01-23 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 18:59 [PATCH] xfs_repair: initialize non-leaf finobt blocks with correct magic Brian Foster
2019-01-23 19:32 ` Eric Sandeen
2019-01-23 20:49   ` Brian Foster
2019-01-23 20:51 ` Dave Chinner [this message]

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=20190123205136.GM4205@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.