new file mode 100755
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Test discard/trim
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+for i in 0 1 2; do
+ _start_sheep $i "-s 1000"
+done
+_wait_for_sheep 3
+$COLLIE cluster format
+sleep 1
+$COLLIE vdi create test 100M -P
+$COLLIE node info
+qemu-io -c "discard 0 100m" sheepdog:test | _filter_qemu_io
+$COLLIE vdi check test
+for i in `seq 0 24`; do
+ $COLLIE vdi object test -i $i;
+done
+$COLLIE node info
new file mode 100644
@@ -0,0 +1,44 @@
+QA output created by 058
+using backend farm store
+Id Size Used Use%
+ 0 1000 MB 104 MB 10%
+ 1 1000 MB 104 MB 10%
+ 2 1000 MB 104 MB 10%
+Total 2.9 GB 312 MB 10%
+
+Total virtual image size 100 MB
+discard 104857600/104857600 bytes at offset 0
+100 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+finish check&repair test
+The inode object 0x7c2b25 idx 0 is not allocated
+The inode object 0x7c2b25 idx 1 is not allocated
+The inode object 0x7c2b25 idx 2 is not allocated
+The inode object 0x7c2b25 idx 3 is not allocated
+The inode object 0x7c2b25 idx 4 is not allocated
+The inode object 0x7c2b25 idx 5 is not allocated
+The inode object 0x7c2b25 idx 6 is not allocated
+The inode object 0x7c2b25 idx 7 is not allocated
+The inode object 0x7c2b25 idx 8 is not allocated
+The inode object 0x7c2b25 idx 9 is not allocated
+The inode object 0x7c2b25 idx 10 is not allocated
+The inode object 0x7c2b25 idx 11 is not allocated
+The inode object 0x7c2b25 idx 12 is not allocated
+The inode object 0x7c2b25 idx 13 is not allocated
+The inode object 0x7c2b25 idx 14 is not allocated
+The inode object 0x7c2b25 idx 15 is not allocated
+The inode object 0x7c2b25 idx 16 is not allocated
+The inode object 0x7c2b25 idx 17 is not allocated
+The inode object 0x7c2b25 idx 18 is not allocated
+The inode object 0x7c2b25 idx 19 is not allocated
+The inode object 0x7c2b25 idx 20 is not allocated
+The inode object 0x7c2b25 idx 21 is not allocated
+The inode object 0x7c2b25 idx 22 is not allocated
+The inode object 0x7c2b25 idx 23 is not allocated
+The inode object 0x7c2b25 idx 24 is not allocated
+Id Size Used Use%
+ 0 1000 MB 4.0 MB 0%
+ 1 1000 MB 4.0 MB 0%
+ 2 1000 MB 4.0 MB 0%
+Total 2.9 GB 12 MB 0%
+
+Total virtual image size 100 MB
@@ -71,3 +71,4 @@
055 auto cluster md
056 auto quick cluster md
057 auto quick cluster md
+058 auto quick cluster md