/* Mark all iclogs IOERROR. l_icloglock is held by the caller.  */
STATIC int xlog_state_ioerror(xlog_t *log)
/* Mark all iclogs IOERROR. l_icloglock is held by the caller.  */
STATIC int xlog_state_ioerror(xlog_t *log)
{
	xlog_in_core_t	*iclog, *ic;
	iclog = log->l_iclog;
	if (! (iclog->ic_state & XLOG_STATE_IOERROR)) {
		ic = iclog;
		do {
			ic->ic_state = XLOG_STATE_IOERROR;
			ic = ic->ic_next;
		} while (ic != iclog);
		return 0;
	}
	return 1;
}