On Mon 09 Nov 2015 05:26:38 PM CET, Kevin Wolf wrote:
>> > if (blk) {
>> > blk_unref(blk);
>> > } else {
>> > + QTAILQ_REMOVE(&monitor_bdrv_states, bs, monitor_list);
>> > bdrv_unref(bs);
>> > }
>>
>> blk_unref(blk) will also unref the BDS (if there's any), so you also
>> need to update monitor_bdrv_states in that case, don't you?
>
> No, in that case the BDS referenced wasn't owned by the monitor in the
> first place. It was owned by the BB.
I see, I hadn't noticed that the BDS is added to monitor_bdrv_states
only if it is created without a BB.
You're right then, thanks!
Berto