linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>,
	sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs_db: calculate iext tree geometry in btheight command
Date: Mon, 30 Sep 2019 09:11:52 -0700	[thread overview]
Message-ID: <20190930161151.GA13108@magnolia> (raw)
In-Reply-To: <20190930075854.GK27886@infradead.org>

On Mon, Sep 30, 2019 at 12:58:54AM -0700, Christoph Hellwig wrote:
> On Fri, Sep 27, 2019 at 07:41:02AM +1000, Dave Chinner wrote:
> > > +static int iext_maxrecs(struct xfs_mount *mp, int blocklen, int leaf)
> > > +{
> > > +	blocklen -= 2 * sizeof(void *);
> > > +
> > > +	return blocklen / sizeof(struct xfs_bmbt_rec);
> > > +}
> > 
> > This isn't correct for the iext nodes. They hold 16 key/ptr pairs,
> > not 15.
> > 
> > I suspect you should be lifting the iext btree format definitions
> > like this one:
> 
> Is the command supposed to deal with the on-disk or in-memory nodes?
> The ones your quote are the in-memory btrees, but the file seems
> (the way I read it, the documentation seems to be lacking) with the
> on-disk btrees.

It started as a command for calculating ondisk btree geometry but then
we were discussing the iext tree geometry on irc so I extended it to
handle that too.

(Ugh, where /did/ the documentation go...)

--D

  reply	other threads:[~2019-09-30 16:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 21:40 [PATCH 0/2] xfs_db: fixes to the btheight command Darrick J. Wong
2019-09-25 21:40 ` [PATCH 1/2] xfs_db: btheight should check geometry more carefully Darrick J. Wong
2019-09-26  9:11   ` Carlos Maiolino
2019-09-26 17:38     ` Darrick J. Wong
2019-09-27 12:30       ` Carlos Maiolino
2019-09-26 19:09   ` [PATCH v2 " Darrick J. Wong
2019-10-01  6:40     ` Carlos Maiolino
2019-09-30  7:55   ` [PATCH " Christoph Hellwig
2019-09-25 21:40 ` [PATCH 2/2] xfs_db: calculate iext tree geometry in btheight command Darrick J. Wong
2019-09-26  9:20   ` Carlos Maiolino
2019-09-26 17:40     ` Darrick J. Wong
2019-09-26 19:09   ` [PATCH v2 " Darrick J. Wong
2019-09-26 21:41   ` [PATCH " Dave Chinner
2019-09-27  2:58     ` Darrick J. Wong
2019-09-27 22:08       ` Dave Chinner
2019-09-30  7:58     ` Christoph Hellwig
2019-09-30 16:11       ` Darrick J. Wong [this message]
2019-10-01  6:24         ` Christoph Hellwig

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=20190930161151.GA13108@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).