On Fri, Feb 01, 2019 at 08:23:22AM +0100, Christoph Hellwig wrote: > > > flags |= XFS_BMAPI_DELALLOC; > > > - return xfs_bmapi_write(tp, ip, bno, 1, flags, total, imap, nimaps); > > > + error = xfs_bmapi_write(tp, ip, offset_fsb, 1, flags, > > > + XFS_EXTENTADD_SPACE_RES(ip->i_mount, XFS_DATA_FORK), > > > > Shouldn't this be whichfork? > > Yeah. Actually - XFS_EXTENTADD_SPACE_RES expands to XFS_BM_MAXLEVELS, which indexes into m_bm_maxlevels, which only contains two members, one for the data and one for the attr fork. So this should stay a hardcoded XFS_DATA_FORK.