From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: =?ISO-2022-JP-2?B?GyRCPXk+LhskQUF6GyhC?= <nxtxiaolong@gmail.com>
Cc: kwolf@redhat.com, Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>,
morita.kazutaka@gmail.com, qemu-devel@nongnu.org,
namei.unix@gmail.com
Subject: Re: [Qemu-devel] qemu-img:the sheepdog snapshot vdi's lock will not be released when use qemu-img to create a snapshot vdi
Date: Wed, 24 Dec 2014 23:47:01 +0900 [thread overview]
Message-ID: <87k31hgl5m.wl%mitake.hitoshi@gmail.com> (raw)
In-Reply-To: <CAPRv0HAzfA3kU_dAR8LGQr4KoPNp9cYNzc_hqSGejfxL3SxjWw@mail.gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 2001 bytes --]
At Mon, 22 Dec 2014 17:41:33 +0800,
^[$B=y>.^[$AAz^[(B wrote:
>
> [1 <text/plain; UTF-8 (7bit)>]
> hi,all,
> when i use `qemu-img snapshot -c test-s sheepdog:test` to create a
> snapshot of sheepdog vdi,the snapshot's lock not be released.
>
> root@hty-compute1:~/qemu# ./qemu-img create sheepdog:test 1G
> Formatting 'sheepdog:test', fmt=raw size=1073741824
>
> root@hty-compute1:~/qemu# dog vdi list
> Name Id Size Used Shared Creation time VDI id Copies
> Tag
> test 0 1.0 GB 0.0 MB 0.0 MB 2014-12-22 17:10 7c2b25 3
>
> root@hty-compute1:~/qemu# ./qemu-img snapshot -c test-s 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@hty-compute1:~/qemu# dog vdi lock list
> VDI | Owner node | Tag
> s test | IPv4 ip:172.16.17.200 port:7000 test-s
>
> when i create a snapshot ,the src vdi will be open and locked,in the
> function `sd_open` read the vdi inode info saved in the struct
> BDRVSheepdogState ,and in the function `sd_snapshot_create` the vdi inode
> information in the struct BDRVSheepdogState will point to an new vdi ,so
> when the function `sd_close` be called,the `sd_close` will try to released
> the lock of new vdi.In conclusion,the snapshot vdi will lock forever , so
> it's will be failed when i try to create a new vdi base on the snapshot.
>
> root@hty-compute1:~/qemu# ./qemu-img create -b sheepdog:test:test-s
> sheepdog:new-vdi
> qemu-img: sheepdog:new-vdi: cannot get vdi info, VDI is already locked,
> test 0 test-s
>
> There may be some wrong in the function`sd_snapshot_create`.but I'm not
> sure the root cause.
>
> Thanks,
> Xiaolong Xu
Xiaolong, thanks for your report. I'll fix it ASAP.
Could you use the dog command as a walkaround?
Thanks,
Hitoshi
next prev parent reply other threads:[~2014-12-24 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 9:41 [Qemu-devel] qemu-img:the sheepdog snapshot vdi's lock will not be released when use qemu-img to create a snapshot vdi 徐小龙
2014-12-24 14:47 ` Hitoshi Mitake [this message]
2014-12-25 14:03 ` long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k31hgl5m.wl%mitake.hitoshi@gmail.com \
--to=mitake.hitoshi@gmail.com \
--cc=kwolf@redhat.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=morita.kazutaka@gmail.com \
--cc=namei.unix@gmail.com \
--cc=nxtxiaolong@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.