/* Set the extent state field in a bmap extent record.  */
void xfs_bmbt_set_state(xfs_bmbt_rec_host_t *r, xfs_exntst_t v)
/* Set the extent state field in a bmap extent record.  */
void xfs_bmbt_set_state(xfs_bmbt_rec_host_t *r, xfs_exntst_t v)
{
	ASSERT(v == XFS_EXT_NORM || v == XFS_EXT_UNWRITTEN);
	if (v == XFS_EXT_NORM)
		r->l0 &= xfs_mask64lo(64 - BMBT_EXNTFLAG_BITLEN);
	else
		r->l0 |= xfs_mask64hi(BMBT_EXNTFLAG_BITLEN);
}