From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] block: Add BDS.never_freeze
Date: Tue, 2 Jul 2019 17:28:37 +0200 [thread overview]
Message-ID: <07be76c5-fea9-96b7-e50b-eddc04a38e42@redhat.com> (raw)
In-Reply-To: <w51v9wk5ybk.fsf@maestria.local.igalia.com>
[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]
On 02.07.19 16:02, Alberto Garcia wrote:
> On Fri 28 Jun 2019 12:32:51 AM CEST, Max Reitz wrote:
>> @@ -4416,6 +4416,14 @@ int bdrv_freeze_backing_chain(BlockDriverState *bs, BlockDriverState *base,
>> return -EPERM;
>> }
>>
>> + for (i = bs; i != base; i = backing_bs(i)) {
>> + if (i->backing && backing_bs(i)->never_freeze) {
>> + error_setg(errp, "Cannot freeze '%s' link to '%s'",
>> + i->backing->name, backing_bs(i)->node_name);
>> + return -EPERM;
>> + }
>> + }
>
> How about adding this to bdrv_is_backing_chain_frozen() instead?
But that’s the wrong place. For example, that function is called by
bdrv_set_backing_hd() to check whether the backing BDS can be changed.
But the point of never_freeze is to ensure that links to the BDS can be
changed.
never_freeze only becomes relevant when trying to freeze the backing
chain, in that it should prevent it. So I think putting the check here
is correct.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-02 16:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 22:32 [Qemu-devel] [PATCH 0/5] block: Add BDS.never_freeze Max Reitz
2019-06-27 22:32 ` [Qemu-devel] [PATCH 1/5] " Max Reitz
2019-07-01 16:46 ` Andrey Shinkevich
2019-07-02 14:02 ` Alberto Garcia
2019-07-02 15:28 ` Max Reitz [this message]
2019-07-02 15:36 ` Alberto Garcia
2019-07-02 15:38 ` Max Reitz
2019-06-27 22:32 ` [Qemu-devel] [PATCH 2/5] iotests: Fix throttling in 030 Max Reitz
2019-07-01 16:41 ` Andrey Shinkevich
2019-07-02 15:09 ` Alberto Garcia
2019-06-27 22:32 ` [Qemu-devel] [PATCH 3/5] iotests: Compare error messages " Max Reitz
2019-07-01 16:42 ` Andrey Shinkevich
2019-07-02 12:37 ` Alberto Garcia
2019-06-27 22:32 ` [Qemu-devel] [PATCH 4/5] iotests: Add @use_log to VM.run_job() Max Reitz
2019-07-01 22:59 ` John Snow
2019-07-02 16:19 ` Max Reitz
2019-07-02 20:21 ` John Snow
2019-06-27 22:32 ` [Qemu-devel] [PATCH 5/5] iotests: Add new case to 030 Max Reitz
2019-07-01 16:44 ` Andrey Shinkevich
2019-07-02 14:59 ` Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07be76c5-fea9-96b7-e50b-eddc04a38e42@redhat.com \
--to=mreitz@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=berto@igalia.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).