[Sheepdog] [PATCH v2] sheep: update inode cache first

Liu Yuan namei.unix at gmail.com
Thu May 10 11:32:54 CEST 2012


On 05/10/2012 04:49 PM, yaohaiting.wujue at gmail.com wrote:

> When create snapshot, write inode of base VDI internally without
> care of cache. Then the inode in cache may be wrong from disk


This patch solves the VDI snapshot problem on my box.

I use the below script:

for i in `seq 0 2`; do sheep/sheep -d /home/tailai.ly/sheepdog/store/$i
-z $i -p $((7000+$i));sleep 1;done
collie/collie cluster format -b farm -c 3
~/qemu-devel/qemu-img convert linux-0.2.img sheepdog:test
~/qemu-devel/qemu-img snapshot -c tag  sheepdog:test

And get the output:
tailai.ly at taobao:~/sheepdog$ collie vdi list
  Name        Id    Size    Used  Shared    Creation time   VDI id  Tag
s test         1   20 MB   20 MB  0.0 MB 2012-05-10 17:26   7c2b25
  test         2   20 MB  0.0 MB   20 MB 2012-05-10 17:26   7c2b26

Tested-by: Liu Yuan <tailai.ly at taobao.com>

Thanks,
Yuan



More information about the sheepdog mailing list