linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs: precalculate default inode attribute offset
Date: Sun, 4 Apr 2021 08:16:30 +1000	[thread overview]
Message-ID: <20210403221630.GZ63242@dread.disaster.area> (raw)
In-Reply-To: <20210402071059.GI1739516@infradead.org>

On Fri, Apr 02, 2021 at 08:10:59AM +0100, Christoph Hellwig wrote:
> On Tue, Mar 30, 2021 at 04:30:59PM +1100, Dave Chinner wrote:
> > +unsigned int
> > +xfs_bmap_compute_attr_offset(
> > +	struct xfs_mount	*mp)
> > +{
> > +	if (mp->m_sb.sb_inodesize == 256)
> > +		return XFS_LITINO(mp) - XFS_BMDR_SPACE_CALC(MINABTPTRS);
> > +	return XFS_BMDR_SPACE_CALC(6 * MINABTPTRS);
> > +}
> 
> There isn't really anything bmap about this function.  Maybe just merge
> it into xfs_mount_setup_inode_geom?

Sure there is - the XFS_BMDR_SPACE_CALC is a specific bmap btree
root size calculation defined in xfs_bmap_btree.h. I left it here
because I don't want to include xfs_bmap_btree.h into
fs/xfs/xfs_mount.h. There is no reason for xfs_mount.c to know
anything about the internals of bmap btrees, similar to how we call
xfs_bmap_compute_maxlevels() to calculate the static characteristics
of the bmap btrees...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2021-04-03 22:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  5:30 [PATCH 0/4] xfs: fix eager attr fork init regressions Dave Chinner
2021-03-30  5:30 ` [PATCH 1/4] xfs: eager inode attr fork init needs attr feature awareness Dave Chinner
2021-03-30 18:10   ` Darrick J. Wong
2021-04-02  6:48   ` Christoph Hellwig
2021-03-30  5:30 ` [PATCH 2/4] xfs: inode fork allocation depends on XFS_IFEXTENT flag Dave Chinner
2021-03-30 18:06   ` Darrick J. Wong
2021-03-30 21:40     ` Dave Chinner
2021-04-02  7:02       ` Christoph Hellwig
2021-04-03 22:21         ` Dave Chinner
2021-04-04  3:25       ` Darrick J. Wong
2021-04-02  7:06   ` Christoph Hellwig
2021-03-30  5:30 ` [PATCH 3/4] xfs: default attr fork size does not handle device inodes Dave Chinner
2021-03-30 18:10   ` Darrick J. Wong
2021-04-02  7:08   ` Christoph Hellwig
2021-03-30  5:30 ` [PATCH 4/4] xfs: precalculate default inode attribute offset Dave Chinner
2021-03-30 18:10   ` Darrick J. Wong
2021-04-02  7:10   ` Christoph Hellwig
2021-04-03 22:16     ` Dave Chinner [this message]
2021-04-06 11:59 [PATCH 0/4 v2] xfs: fix eager attr fork init regressions Dave Chinner
2021-04-06 11:59 ` [PATCH 4/4] xfs: precalculate default inode attribute offset Dave Chinner
2021-04-06 20:08   ` Allison Henderson

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=20210403221630.GZ63242@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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 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).