Project

General

Profile

Bug #5179 ยป arc-unused.patch

Steven Hartland, 2014-09-17 05:24 PM

View differences:

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c (working copy)
1503 1503
	atomic_add_64(&arc_size, -space);
1504 1504
}
1505 1505

  
1506
void *
1507
arc_data_buf_alloc(uint64_t size)
1508
{
1509
	if (arc_evict_needed(ARC_BUFC_DATA))
1510
		cv_signal(&arc_reclaim_thr_cv);
1511
	atomic_add_64(&arc_size, size);
1512
	return (zio_data_buf_alloc(size));
1513
}
1514

  
1515
void
1516
arc_data_buf_free(void *buf, uint64_t size)
1517
{
1518
	zio_data_buf_free(buf, size);
1519
	ASSERT(arc_size >= size);
1520
	atomic_add_64(&arc_size, -size);
1521
}
1522

  
1523 1506
arc_buf_t *
1524 1507
arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type)
1525 1508
{
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h (working copy)
83 83

  
84 84
void arc_space_consume(uint64_t space, arc_space_type_t type);
85 85
void arc_space_return(uint64_t space, arc_space_type_t type);
86
void *arc_data_buf_alloc(uint64_t space);
87
void arc_data_buf_free(void *buf, uint64_t space);
88 86
arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag,
89 87
    arc_buf_contents_t type);
90 88
arc_buf_t *arc_loan_buf(spa_t *spa, int size);
    (1-1/1)