/* Called when we want to mark the current iclog as being ready to sync to disk.  */
STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
/* Called when we want to mark the current iclog as being ready to sync to disk.  */
STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
{
	assert_spin_locked(&log->l_icloglock);
	if (iclog->ic_state == XLOG_STATE_ACTIVE) {
		xlog_state_switch_iclogs(log, iclog, 0);
	} else {
		ASSERT(iclog->ic_state &
			(XLOG_STATE_WANT_SYNC|XLOG_STATE_IOERROR));
	}
}