<div dir="ltr">hi,hitoshi,<div> I have tested this patch using branch <a href="https://github.com/sheepdog/qemu/tree/locking" target="_blank" style="font-size:13px">https://github.com/sheepdog/qemu/tree/locking</a></div><div>with follow methods and results:</div><div><br></div><div>1、test qemu-img</div><div><div><div>root@hty-compute1:~# ./qemu-locking/qemu-img create -f raw sheepdog:test 1G</div><div>Formatting 'sheepdog:test', fmt=raw size=1073741824</div></div><div><br></div><div><div>root@hty-compute1:~# ./qemu-locking/qemu-img snapshot -c test-snap sheepdog:test</div><div>WARNING: Image format was not specified for 'sheepdog:test' and probing guessed raw.</div><div> Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.</div><div> Specify the 'raw' format explicitly to remove the restrictions.</div></div><div><br></div><div>root@hty-compute1:~# ./qemu-locking/qemu-img create -b sheepdog:test:test-snap sheepdog:test-c 1G</div></div><div>Formatting 'sheepdog:test-c', fmt=raw size=1073741824 backing_file='sheepdog:test:test-snap'<br></div><div><br></div><div>2、test qemu-io</div><div><div>root@hty-compute1:~# ./qemu-locking/qemu-io -c "write 0 4096" sheepdog:test</div><div>wrote 4096/4096 bytes at offset 0</div><div>4 KiB, 1 ops; 0.0334 sec (119.435 KiB/sec and 29.8588 ops/sec)</div><div><br></div><div>root@hty-compute1:~# ./qemu-locking/qemu-io -c "write 0 4096" sheepdog:test-c</div><div>wrote 4096/4096 bytes at offset 0</div><div>4 KiB, 1 ops; 0.2805 sec (14.257 KiB/sec and 3.5641 ops/sec)</div></div><div><br></div><div><div>root@hty-compute1:~# ./qemu-locking/qemu-io -c "read 0 4096" sheepdog:test-c</div><div>read 4096/4096 bytes at offset 0</div><div>4 KiB, 1 ops; 0.0001 sec (21.823 MiB/sec and 5586.5922 ops/sec)</div><div><br></div><div>root@hty-compute1:~# ./qemu-locking/qemu-io -c "read 0 4096" sheepdog:test </div><div>read 4096/4096 bytes at offset 0</div><div>4 KiB, 1 ops; 0.0002 sec (17.058 MiB/sec and 4366.8122 ops/sec)</div></div><div><br></div><div>seems work fine.</div><div><br></div><div>Thanks&Best Regards,</div><div>Xiaolong Xu</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 22, 2015 at 5:26 PM, Hitoshi Mitake <span dir="ltr"><<a href="mailto:mitake.hitoshi@lab.ntt.co.jp" target="_blank">mitake.hitoshi@lab.ntt.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Jinzhi and Xiaolong,<br>
<br>
I created a patch for the locking problem of qemu-img and qemu-io. It<br>
can be found here:<br>
<a href="https://github.com/sheepdog/qemu/tree/locking" target="_blank">https://github.com/sheepdog/qemu/tree/locking</a><br>
# It depends on ongoing patchset, so I cannot post immediately<br>
<br>
Could you test the branch and report your result?<br>
<br>
Thanks,<br>
Hitoshi<br>
</blockquote></div><br></div>