/* Second stage of a quiesce. The data is already synced, now we have to take care of the metadata. New transactions are already blocked, so we need to wait for any remaining transactions to drain out before proceding.  */
void xfs_quiesce_attr(struct xfs_mount *mp)
/* Second stage of a quiesce. The data is already synced, now we have to take care of the metadata. New transactions are already blocked, so we need to wait for any remaining transactions to drain out before proceding.  */
void xfs_quiesce_attr(struct xfs_mount *mp)
{
	int	error = 0;
	while (atomic_read(&mp->m_active_trans) > 0)
		delay(100);
	xfs_quiesce_fs(mp);
	WARN_ON(atomic_read(&mp->m_active_trans) != 0);
	error = xfs_log_sbcount(mp, 1);
	if (error)
		xfs_fs_cmn_err(CE_WARN, mp,
				"xfs_attr_quiesce: failed to log sb changes. "
				"Frozen image may not be consistent.");
	xfs_log_unmount_write(mp);
	xfs_unmountfs_writesb(mp);
}