/* Log the leaf entries indicated from a leaf1 or leafn block.  */
void xfs_dir2_leaf_log_ents(xfs_trans_t *tp, xfs_dabuf_t *bp, int first, int last)
/* Log the leaf entries indicated from a leaf1 or leafn block.  */
void xfs_dir2_leaf_log_ents(xfs_trans_t *tp, xfs_dabuf_t *bp, int first, int last)
{
	xfs_dir2_leaf_entry_t	*firstlep;
	xfs_dir2_leaf_entry_t	*lastlep;
	xfs_dir2_leaf_t		*leaf;
	leaf = bp->data;
	ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC ||
	       be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC);
	firstlep = &leaf->ents[first];
	lastlep = &leaf->ents[last];
	xfs_da_log_buf(tp, bp, (uint)((char *)firstlep - (char *)leaf),
		(uint)((char *)lastlep - (char *)leaf + sizeof(*lastlep) - 1));
}