From: 徐小龙 <nxtxiaolong@gmail.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>,
morita.kazutaka@gmail.com, namei.unix@gmail.com
Subject: [Qemu-devel] qemu-img:the sheepdog snapshot vdi's lock will not be released when use qemu-img to create a snapshot vdi
Date: Mon, 22 Dec 2014 17:41:33 +0800 [thread overview]
Message-ID: <CAPRv0HAzfA3kU_dAR8LGQr4KoPNp9cYNzc_hqSGejfxL3SxjWw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2223 bytes --]
next reply other threads:[~2014-12-22 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 9:41 徐小龙 [this message]
2014-12-24 14:47 ` [Qemu-devel] qemu-img:the sheepdog snapshot vdi's lock will not be released when use qemu-img to create a snapshot vdi Hitoshi Mitake
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=CAPRv0HAzfA3kU_dAR8LGQr4KoPNp9cYNzc_hqSGejfxL3SxjWw@mail.gmail.com \
--to=nxtxiaolong@gmail.com \
--cc=kwolf@redhat.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=morita.kazutaka@gmail.com \
--cc=namei.unix@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).