/* See if the directory is a single-block form directory.  */
int xfs_dir2_isblock(xfs_trans_t *tp, xfs_inode_t *dp, int *vp)
/* See if the directory is a single-block form directory.  */
int xfs_dir2_isblock(xfs_trans_t *tp, xfs_inode_t *dp, int *vp)
{
	xfs_fileoff_t	last;
	xfs_mount_t	*mp;
	int		rval;
	mp = dp->i_mount;
	if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK)))
		return rval;
	rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize;
	ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize);
	*vp = rval;
	return 0;
}