[sheepdog] RFT: locking issue of qemu-img and qemu-io

徐小龙 nxtxiaolong at gmail.com
Thu Jan 22 12:43:08 CET 2015


hi,hitoshi,
   I have tested this patch using branch
https://github.com/sheepdog/qemu/tree/locking
with follow methods and results:

1、test qemu-img
root at hty-compute1:~# ./qemu-locking/qemu-img create -f raw sheepdog:test 1G
Formatting 'sheepdog:test', fmt=raw size=1073741824

root at hty-compute1:~# ./qemu-locking/qemu-img snapshot -c test-snap
sheepdog:test
WARNING: Image format was not specified for 'sheepdog:test' and probing
guessed raw.
         Automatically detecting the format is dangerous for raw images,
write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

root at hty-compute1:~# ./qemu-locking/qemu-img create -b
sheepdog:test:test-snap sheepdog:test-c 1G
Formatting 'sheepdog:test-c', fmt=raw size=1073741824
backing_file='sheepdog:test:test-snap'

2、test qemu-io
root at hty-compute1:~# ./qemu-locking/qemu-io -c "write 0 4096" sheepdog:test
wrote 4096/4096 bytes at offset 0
4 KiB, 1 ops; 0.0334 sec (119.435 KiB/sec and 29.8588 ops/sec)

root at hty-compute1:~# ./qemu-locking/qemu-io -c "write 0 4096"
sheepdog:test-c
wrote 4096/4096 bytes at offset 0
4 KiB, 1 ops; 0.2805 sec (14.257 KiB/sec and 3.5641 ops/sec)

root at hty-compute1:~# ./qemu-locking/qemu-io -c "read 0 4096" sheepdog:test-c
read 4096/4096 bytes at offset 0
4 KiB, 1 ops; 0.0001 sec (21.823 MiB/sec and 5586.5922 ops/sec)

root at hty-compute1:~# ./qemu-locking/qemu-io -c "read 0 4096" sheepdog:test
read 4096/4096 bytes at offset 0
4 KiB, 1 ops; 0.0002 sec (17.058 MiB/sec and 4366.8122 ops/sec)

seems work fine.

Thanks&Best Regards,
Xiaolong Xu

On Thu, Jan 22, 2015 at 5:26 PM, Hitoshi Mitake <
mitake.hitoshi at lab.ntt.co.jp> wrote:

>
> Hi Jinzhi and Xiaolong,
>
> I created a patch for the locking problem of qemu-img and qemu-io. It
> can be found here:
> https://github.com/sheepdog/qemu/tree/locking
> # It depends on ongoing patchset, so I cannot post immediately
>
> Could you test the branch and report your result?
>
> Thanks,
> Hitoshi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20150122/77bb23fa/attachment-0004.html>


More information about the sheepdog mailing list