Re: [PATCH 2/9] xfs: encode the default bc_flags in the btree ops structure

Darrick J. Wong
2024-01-03T01:15:11Z

On Tue, Jan 02, 2024 at 02:33:34AM -0800, Christoph Hellwig wrote:
> On Sun, Dec 31, 2023 at 12:17:28PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Certain btree flags never change for the life of a btree cursor because
> > they describe the geometry of the btree itself. Encode these in the
> > btree ops structure and reduce the amount of code required in each btree
> > type's init_cursor functions.
>
> I like the idea, but why are the geom_flags mirrored into bc_flags
> instead of beeing kept entirely separate and accessed as
> cur->bc_ops->geom_flags which would be a lot easier to follow?

Oh! That hadn't occurred to me. Let me take a look at that.

--D