qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Question] How can we confirm hot-plug disk succesfully


From: Xie Changlong
Subject: Re: [Qemu-block] [Question] How can we confirm hot-plug disk succesfully?
Date: Thu, 22 Jun 2017 09:12:03 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

在 6/19/2017 6:49 PM, Kevin Wolf 写道:
'info block' shows nothing, but we can't add drive who's id
is'drive-virtio-disk1' too.
Yes, the old BlockBackend is only fully freed when the guest actually
unplugs the device. Specifically, we would have to free the QemuOpts
in DriveInfo that keeps the ID reserved. Currently, it is only freed
when the BlockBackend is destroyed:

     blockdev_auto_del()
         blk_unref()
             blk_delete()
                 drive_info_del()

We can't free the DriveInfo earlier because it's still needed while the
guest device is still alive.

I'm not sure, but it may be possible to free just the QemuOpts in
monitor_remove_blk(), so that the ID can immediately be reused.

Markus, would you know?


Hi, all. Any ideas?

There is a more serious situation, we
could*never*  destory device memory with 'device_del', it's memory
leak to me if the guest os never support hot-plug and the user don't
know this information.
The user sees that they never get a DEVICE_REMOVED event, so in some way
the do know about it.

But the useless memory is always there and no way to free it, although we known that.
BTW, is it possible to force destroy the BlockBackend in this situation?

--
Thanks
    -Xie



reply via email to

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