Still digesting the algorithmic changes, but a few nitpicks below: > /* > + * BLock allocation algorithm and data structures. I think the upper case L is a typo. > +struct xfs_alloc_btree_cur { > + struct xfs_btree_cur *cur; /* cursor */ > + bool active; /* cursor active flag */ > +}; Can't we move the active flag inside the btree_cur, more specically into enum xfs_btree_cur_private? Or maybe we should byte the bullet and make xfs_btree_cur a structure embedded into the type specific structures and use container_of. But I certainly don't want to burden that on you and this series..