func (m *baseBuffer) Unpin() {
	if m == nil {
		return
	}
	m.busy.Unlock()
}
Unpin marks a buffer idle, so it can be recycled
package cafs
import (
	"math"
	"sync"
	"unsafe"
	"github.com/docker/go-units"
)
const (
	leaf1MB uint32 = 1 * units.MiB
	leaf2MB uint32 = 2 * units.MiB
	leaf3MB uint32 = 3 * units.MiB
	leaf4MB uint32 = 4 * units.MiB
)
func BytesToBuffers(target int, leafSize uint32) int {
	return int(math.Ceil(float64(target) / float64(leafSize)))
}
type FreeList interface {
	Get() LeafBuffer
	Release(LeafBuffer)
	Buffers() int
	FreeBuffers() int
	Size() uint32
}
type LeafBuffer interface {
	Bytes() []byte
	Copy([]byte)
	Slice(low, high int) []byte
	Reset()
	Pin()
	Unpin()
}
type baseBuffer struct {
	slice []byte
	busy  sync.Mutex
}
func (m *baseBuffer) Bytes() []byte {
	return m.slice
}
func (m *baseBuffer) Copy(val []byte) {
	n := copy(m.slice[:cap(m.slice)], val)
	m.slice = m.slice[:n]
}
func (m *baseBuffer) Slice(low, high int) []byte {
	m.slice = m.slice[low:high]
	return m.slice
}
func (m *baseBuffer) Pin() {
	if m == nil {
		return
	}
	m.busy.Lock()
}