[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 12/15] blockdev: Keep track of monitor-owned
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH v6 12/15] blockdev: Keep track of monitor-owned BDS |
Date: |
Mon, 09 Nov 2015 17:38:30 +0100 |
User-agent: |
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) |
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
- Re: [Qemu-devel] [PATCH v6 07/15] block: Move BDS close notifiers into BB, (continued)
[Qemu-devel] [PATCH v6 08/15] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 09/15] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 10/15] block: Make bdrv_close() static, Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 11/15] block: Add list of all BlockDriverStates, Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 12/15] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 13/15] block: Add blk_remove_all_bs(), Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 14/15] block: Rewrite bdrv_close_all(), Max Reitz, 2015/11/04
[Qemu-devel] [PATCH v6 15/15] iotests: Add test for multiple BB on BDS tree, Max Reitz, 2015/11/04
Re: [Qemu-devel] [PATCH v6 for-2.6 00/15] block: Rework bdrv_close_all(), Kevin Wolf, 2015/11/09