qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] Check backing_file chain's loop


From: Dongxu Wang
Subject: [Qemu-devel] [RFC] Check backing_file chain's loop
Date: Thu, 30 May 2013 18:14:11 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Hi,

Now block layer does not check whether backing_file chain can be a circle, do you think it is necessary to do a check?

For example, 1.qcow2's backing_file is 2.qcow2 and 2.qcow2's backing_file is 1.qcow2, then any IO operation will be a fault.

If necessary, I will post a patch to fix.

[$] qemu-img create -f qcow2 1.qcow2
qemu-img: Image creation needs a size parameter
[$] qemu-img create -f qcow2 1.qcow2 8M
Formatting '1.qcow2', fmt=qcow2 size=8388608 encryption=off cluster_size=65536 lazy_refcounts=off
[$] qemu-img create -f qcow2 2.qcow2 -o backing_file=1.qcow2
Formatting '2.qcow2', fmt=qcow2 size=8388608 backing_file='1.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
[$] qemu-img create -f qcow2 1.qcow2 -o backing_file=2.qcow2
Formatting '1.qcow2', fmt=qcow2 size=8388608 backing_file='2.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
[$] qemu-io -c "read -v 0 512" 1.qcow2
^CSegmentation fault (core dumped)



Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]