Re: [PATCH v4 2/3] minix: add iomap functions and definitions

From: Jeremy Bingham

Date: Mon Sep 21 2026 - 14:16:42 EST


On Sun, Sep 20, 2026 at 11:50 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Sat, Sep 19, 2026 at 10:51:32AM -0700, Jeremy Bingham wrote:
> > On Fri, Sep 18, 2026 at 7:12 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> > >
> > > On Wed, Aug 26, 2026 at 02:41:56PM -0700, Jeremy Bingham wrote:
> > > > This patch also wires iomap.c into itree_v1.c and itree_v2.c, similarly
> > > > to how itree_common.c is included in those files, and exports version
> > > > specific versions of minix_iomap_begin and iomap_ops.
> > >
> > > Can we keep the iomap code out of this double build mess? Just define
> > > some low-level helper in it, but keep everything else in an only
> > > once build iomap.c
> >
> > OK. I went back and forth a bunch on how to best do this, because it's *such* a mess.
>
> Agreed.
>
> > I had a lot of reservations about the way I had done it, but
> > it's so all around
> > messy I ended up there. When I refactor it I'll either move that function to
> > itree_common.c or craft a way to get that depth information out.
>
> It might be worthwhile to kill this mess off first. AFAICS it was
> written at a time when branch predictors where much worse than
> today. So having a branch for te two cases much lower down in the code
> should be just fine with modern CPUs.

As it happens, back on July 6th I submitted an RFC patch to do this
very thing. It dropped off the radar, though, and I didn't push it. It
may need updating to match the very very latest kernel sources and
strip out the extra RFC-related comments, but the lore link is at
https://lore.kernel.org/linux-fsdevel/cover.1783324260.git.jbingham@xxxxxxxxx/T/#u.
If the general concept is good, I'll clean it up and send it through
again.

-j