[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_o
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags |
Date: |
Thu, 15 Sep 2016 13:24:26 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 14 Sep 2016 06:40:29 PM CEST, Kevin Wolf wrote:
>> + if (flags & BDRV_O_RDWR) {
>> + flags |= BDRV_O_ALLOW_RDWR;
>> + }
>> +
>> + if (flags & BDRV_O_SNAPSHOT) {
>> + snapshot_options = qdict_new();
>> + bdrv_temp_snapshot_options(&snapshot_flags, snapshot_options,
>> + flags, options);
>> + bdrv_backing_options(&flags, options, flags, options);
>> + }
>> +
>> bs->open_flags = flags;
>> bs->options = options;
>> options = qdict_clone_shallow(options);
>
> Here I think we get different semantics now: bdrv_backing_options()
> only affected the cloned QDict before, and now it affects bs->options,
> too.
The thing is that bdrv_backing_options() doesn't change the options in
general, and in the case where it does (BDRV_OPT_READ_ONLY after the
next patch) I think it makes sense that the options are changed.
"snapshot=on" is a bit of a special case after all.
Berto
- Re: [Qemu-devel] [PATCH 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs', (continued)
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
[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