#!/bin/bash

# Test object cache reclaim

. ./common

for i in `seq 0 2`; do
    _start_sheep $i "-w size=20"
done

_wait_for_sheep "3"

_cluster_format -c 2

$DOG vdi create test 40M

_random | $DOG vdi write test

# check cache size, should be 20 * 80%
nr=`ls $STORE/0/cache/7c2b25 | wc -l`
if [ $nr -gt 4 ]; then
    echo "reclaim failed"
fi
