FreeBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/*
 * Evict the specified number of bytes from the state specified,
 * restricting eviction to the spa and type given. This function
 * prevents us from trying to evict more from a state's list than
 * is "evictable", and to skip evicting altogether when passed a
 * negative value for "bytes". In contrast, arc_evict_state() will
 * evict everything it can, when passed a negative value for "bytes".
 */
Evict the specified number of bytes from the state specified,
restricting eviction to the spa and type given. This function
prevents us from trying to evict more from a state's list than
is "evictable", and to skip evicting altogether when passed a
negative value for "bytes". In contrast, arc_evict_state() will
evict everything it can, when passed a negative value for "bytes".
Evict the specified number of bytes from the state specified restricting eviction to the spa and type given . This function prevents us from trying to evict more from a state ' s list than is " evictable " and to skip evicting altogether when passed a negative value for " bytes " . In contrast arc_evict_state () will evict everything it can when passed a negative value for " bytes " .
static uint64_t
arc_adjust_impl(arc_state_t *state, uint64_t spa, int64_t bytes,
    arc_buf_contents_t type)
{
	int64_t delta;
	if (bytes > 0 && state->arcs_lsize[type] > 0) {
		delta = MIN(state->arcs_lsize[type], bytes);
		return (arc_evict_state(state, spa, delta, type));
	}
	return (0);
}
static uint64_t arc_adjust_impl ( arc_state_t * state , uint64_t spa , int64_t bytes , arc_buf_contents_t type ) { int64_t delta ; if ( bytes > 0 && state -> arcs_lsize [ type ] > 0 ) { delta = MIN ( state -> arcs_lsize [ type ] , bytes ) ; return ( arc_evict_state ( state , spa , delta , type ) ) ; } return ( 0 ) ; }
Evict the specified number of bytes from the state specified,
 restricting eviction to the spa and type given.
Evict the specified number of bytes from the state specified restricting eviction to the spa and type given .