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.