[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR a
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags |
Date: |
Thu, 15 Sep 2016 11:10:17 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 14 Sep 2016 08:54:19 PM CEST, Jeff Cody wrote:
>> If an image is opened with snapshot=on, its flags are modified by
>> bdrv_backing_options() and then bs->open_flags is updated accordingly.
>> This last step is unnecessary if we calculate the new flags before
>> setting bs->open_flags.
>>
>> Soon we'll introduce the "read-only" option, and then we'll need to be
>> able to modify its value in the QDict when snapshot=on. This is more
>> cumbersome if bs->options is already set. This patch simplifies that.
>>
>> The code that sets BDRV_O_ALLOW_RDWR is also moved for the same
>> reason.
>
> Before, we would not set BDRV_O_ALLOW_RDWR for protocols, but this
> will change that. Is that side-affect intentional?
BDRV_O_ALLOW_RDWR is set in the root BDS, and then all children inherit
that flag (both bdrv_inherited_options() and bdrv_backing_options() copy
it), so I don't think the ((flags & BDRV_O_PROTOCOL) == 0) check makes
any difference in practice.
Berto
- Re: [Qemu-devel] [PATCH 1/7] block: Remove bdrv_is_snapshot, (continued)
- [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/14
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Kevin Wolf, 2016/09/14
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/15
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Kevin Wolf, 2016/09/15
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/15
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Kevin Wolf, 2016/09/15
- Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/15
Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Jeff Cody, 2016/09/14
- Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags,
Alberto Garcia <=
[Qemu-devel] [PATCH 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child(), Alberto Garcia, 2016/09/14
[Qemu-devel] [PATCH 4/7] block: Add "read-only" to the options QDict, Alberto Garcia, 2016/09/14