FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/*
 * Flush all "evictable" data of the given type from the arc state
 * specified. This will not evict any "active" buffers (i.e. referenced).
 *
 * When 'retry' is set to FALSE, the function will make a single pass
 * over the state and evict any buffers that it can. Since it doesn't
 * continually retry the eviction, it might end up leaving some buffers
 * in the ARC due to lock misses.
 *
 * When 'retry' is set to TRUE, the function will continually retry the
 * eviction until *all* evictable buffers have been removed from the
 * state. As a result, if concurrent insertions into the state are
 * allowed (e.g. if the ARC isn't shutting down), this function might
 * wind up in an infinite loop, continually trying to evict buffers.
 */
Flush all "evictable" data of the given type from the arc state
specified. This will not evict any "active" buffers .

When 'retry' is set to FALSE, the function will make a single pass
over the state and evict any buffers that it can. Since it doesn't
continually retry the eviction, it might end up leaving some buffers
in the ARC due to lock misses.

When 'retry' is set to TRUE, the function will continually retry the
eviction until *all* evictable buffers have been removed from the
state. As a result, if concurrent insertions into the state are
allowed , this function might
wind up in an infinite loop, continually trying to evict buffers.
Flush all " evictable " data of the given type from the arc state specified . This will not evict any " active " buffers . When ' retry ' is set to FALSE the function will make a single pass over the state and evict any buffers that it can . Since it doesn ' t continually retry the eviction it might end up leaving some buffers in the ARC due to lock misses . When ' retry ' is set to TRUE the function will continually retry the eviction until * all * evictable buffers have been removed from the state . As a result if concurrent insertions into the state are allowed this function might wind up in an infinite loop continually trying to evict buffers .
static uint64_t
arc_flush_state(arc_state_t *state, uint64_t spa, arc_buf_contents_t type,
    boolean_t retry)
{
	uint64_t evicted = 0;
	while (state->arcs_lsize[type] != 0) {
		evicted += arc_evict_state(state, spa, ARC_EVICT_ALL, type);
		if (!retry)
			break;
	}
	return (evicted);
}
static uint64_t arc_flush_state ( arc_state_t * state , uint64_t spa , arc_buf_contents_t type , boolean_t retry ) { uint64_t evicted = 0 ; while ( state -> arcs_lsize [ type ] != 0 ) { evicted += arc_evict_state ( state , spa , ARC_EVICT_ALL , type ) ; if ( ! retry ) break ; } return ( evicted ) ; }
Flush all "evictable" data of the given type from the arc state
 specified.
Flush all " evictable " data of the given type from the arc state specified .