qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/23] block: New BlockBackend


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 02/23] block: New BlockBackend
Date: Thu, 11 Sep 2014 16:38:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Markus Armbruster <address@hidden> writes:

> Kevin Wolf <address@hidden> writes:
[...]
>>> diff --git a/blockdev.c b/blockdev.c
>>> index 9fbd888..86596bc 100644
>>> --- a/blockdev.c
>>> +++ b/blockdev.c
[...]
>>> @@ -1770,7 +1778,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, 
>>> QObject **ret_data)
>>>       */
>>>      if (bdrv_get_attached_dev(bs)) {
>>>          bdrv_make_anon(bs);
>>> -
>>> +        blk_unref(blk_by_name(id));
>>>          /* Further I/O must not pause the guest */
>>>          bdrv_set_on_error(bs, BLOCKDEV_ON_ERROR_REPORT,
>>>                            BLOCKDEV_ON_ERROR_REPORT);
>>
>> Won't we unref the BB a second time now when unplugging the device?
>> (drive_del() called in blockdev_auto_del())
>
> Short answer: you're right, there's a bug, and I'll fix it.
>
> Long answer: this part is hairy, because the drive_del command is badly
> designed.
[...]
> Simplest possible solution: I hide the BB here, and *leak* it (with a
> fat FIXME comment) until it becomes easy enough to find.  I guess I can
> find it right in the next patch.

Nevermind, I found a tolerable way to avoid the temporary leak.



reply via email to

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