On Tue, May 12, 2020 at 12:10:53PM -0400, Brian Foster wrote: > > ip->i_d.di_forkoff = 0; > > ip->i_d.di_aformat = XFS_DINODE_FMT_EXTENTS; > > > > - ASSERT(ip->i_d.di_anextents == 0); > > Perhaps we could create an analogous assert in xfs_idestroy_fork()? Added for the next version. > > @@ -229,6 +228,8 @@ xfs_iformat_data_fork( > > struct inode *inode = VFS_I(ip); > > int error; > > > > + ip->i_df.if_nextents = be32_to_cpu(dip->di_nextents); > > + > > Could use a comment here that the format calls below might depend on > this being set (i.e. xfs_iformat_btree() just above). > > ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_NOFS); > > + ip->i_afp->if_nextents = be16_to_cpu(dip->di_anextents); > > + > > Same here. Otherwise LGTM: Sure.