[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/13] block: Allow changing the backing file
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/13] block: Allow changing the backing file on reopen |
Date: |
Tue, 12 Mar 2019 15:41:35 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 12 Mar 2019 01:20:54 PM CET, Kevin Wolf wrote:
>> + reopen_state->replace_backing_bs = true;
>> + reopen_state->new_backing_bs = new_backing_bs;
>
> Do we need to bdrv_ref(new_backing_bs) here in case its only reference
> is dropped in the same reopen transaction?
I'm not sure if it can happen with the current code, but the reopen
state should have an extra reference so I'll add it.
>> + /* Check if new_backing_bs would accept the new permissions */
>> + if (reopen_state->replace_backing_bs && reopen_state->new_backing_bs) {
>> + uint64_t cur_perm, cur_shared;
>> + bdrv_child_perm(reopen_state->bs, reopen_state->new_backing_bs,
>> + NULL, &child_backing, NULL,
>
> Why do we pass NULL instead of queue here? Shouldn't the required
> permissions be calculated based on the post-reopen state?
You're right, I'll fix it.
Berto
- [Qemu-devel] [PATCH v2 00/13] Add a 'x-blockdev-reopen' QMP command, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 06/13] block: Handle child references in bdrv_reopen_queue(), Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 08/13] block: Allow changing the backing file on reopen, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 11/13] block: Remove the AioContext parameter from bdrv_reopen_multiple(), Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 05/13] block: Add 'keep_old_opts' parameter to bdrv_reopen_queue(), Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 09/13] block: Add a 'mutable_opts' field to BlockDriver, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 04/13] block: Freeze the backing chain for the duration of the stream job, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 10/13] block: Add bdrv_reset_options_allowed(), Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 13/13] qemu-iotests: Test the x-blockdev-reopen QMP command, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 03/13] block: Freeze the backing chain for the duration of the mirror job, Alberto Garcia, 2019/03/06