From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Jeff Cody <jcody@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 09/14] block: Use bdrv_reopen_set_read_only() in the mirror driver
Date: Mon, 8 Oct 2018 03:46:13 +0200 [thread overview]
Message-ID: <5466eec0-4cc6-5717-945d-6e252e30c32d@redhat.com> (raw)
In-Reply-To: <32c99e47940fcee5e83c780147e34a8f3840f7e4.1537367701.git.berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
On 19.09.18 16:47, Alberto Garcia wrote:
> The 'block-commit' QMP command is implemented internally using two
> different drivers. If the source image is the active layer then the
> mirror driver is used (commit_active_start()), otherwise the commit
> driver is used (commit_start()).
>
> In both cases the destination image must be put temporarily in
> read-write mode. This is done correctly in the latter case, but what
> commit_active_start() does is copy all flags instead.
Well, not only commit_active_start(). mirror_exit() does exactly the
same. It does seem on purpose to let the target have exactly the same
flags as the source eventually.
Then again, none of the other flags seem to make any sense to me here.
Therefore, I tend to agree that it is a bug fix, even though I wouldn't
say it was an oversight.
Reviewed-by: Max Reitz <mreitz@redhat.com>
...eagerly awaiting rebase on 737efc1eda2.
> This patch replaces the bdrv_reopen() calls in that function with
> bdrv_reopen_set_read_only() so that only the read-only status is
> changed.
>
> A similar change is made in mirror_exit(), which is also used by the
> 'drive-mirror' and 'blockdev-mirror' commands.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block/mirror.c | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-10-08 1:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1537367701.git.berto@igalia.com>
[not found] ` <16ec059666d4e2177ad59b9a85978979a0d45917.1537367701.git.berto@igalia.com>
2018-10-08 0:43 ` [Qemu-devel] [PATCH 01/14] block: Don't call update_flags_from_options() if the options are wrong Max Reitz
[not found] ` <23f88429b3135b18abdc8643fb5cc35a6dd5d912.1537367701.git.berto@igalia.com>
2018-10-08 0:55 ` [Qemu-devel] [PATCH 02/14] block: Add bdrv_reopen_set_read_only() Max Reitz
[not found] ` <fd17cf9069d624e3a0b55ee3ba037830c23c60be.1537367701.git.berto@igalia.com>
2018-10-08 0:58 ` [Qemu-devel] [PATCH 03/14] block: Use bdrv_reopen_set_read_only() in bdrv_backing_update_filename() Max Reitz
[not found] ` <57d02fc28b31eebda8ee6d751587c5f25ebf5af0.1537367701.git.berto@igalia.com>
2018-10-08 1:11 ` [Qemu-devel] [PATCH 04/14] block: Use bdrv_reopen_set_read_only() in commit_start/complete() Max Reitz
[not found] ` <27ece91df0fbe7528e01425e94992e46b71ff042.1537367701.git.berto@igalia.com>
2018-10-08 1:16 ` [Qemu-devel] [PATCH 05/14] block: Use bdrv_reopen_set_read_only() in bdrv_commit() Max Reitz
[not found] ` <5f1c063ccfaf20fde5d1334652648f054b0f9d8a.1537367701.git.berto@igalia.com>
2018-10-08 1:21 ` [Qemu-devel] [PATCH 06/14] block: Use bdrv_reopen_set_read_only() in stream_start/complete() Max Reitz
[not found] ` <f68a21f152eef2c51361539bdc6c8f5eefe6af61.1537367701.git.berto@igalia.com>
2018-10-08 1:26 ` [Qemu-devel] [PATCH 07/14] block: Use bdrv_reopen_set_read_only() in qmp_change_backing_file() Max Reitz
[not found] ` <8f8a151dae565027208268ed8d120e4612ef5f9f.1537367701.git.berto@igalia.com>
2018-10-08 1:31 ` [Qemu-devel] [PATCH 08/14] block: Use bdrv_reopen_set_read_only() in external_snapshot_commit() Max Reitz
2018-10-08 18:04 ` Alberto Garcia
[not found] ` <32c99e47940fcee5e83c780147e34a8f3840f7e4.1537367701.git.berto@igalia.com>
2018-10-08 1:46 ` Max Reitz [this message]
[not found] ` <570b9109b10c519aceb6c333a6e0d0a59795defb.1537367701.git.berto@igalia.com>
2018-10-08 1:48 ` [Qemu-devel] [PATCH 10/14] block: Drop bdrv_reopen() Max Reitz
[not found] ` <298f85a0b53dc90b1d6bea272c26983ab684619e.1537367701.git.berto@igalia.com>
2018-10-08 2:05 ` [Qemu-devel] [PATCH 11/14] qemu-io: Put flag changes in the options QDict in reopen_f() Max Reitz
[not found] ` <95addb261af316f49517069e1cce4d9c601d274b.1537367701.git.berto@igalia.com>
2018-10-08 2:34 ` [Qemu-devel] [PATCH 12/14] block: Clean up reopen_backing_file() in block/replication.c Max Reitz
2018-10-10 11:23 ` Alberto Garcia
[not found] ` <8e3622ca8e46a8f450dd94f6f2a485bfbe4a72ab.1537367701.git.berto@igalia.com>
2018-10-08 2:41 ` [Qemu-devel] [PATCH 13/14] block: Remove flags parameter from bdrv_reopen_queue() Max Reitz
[not found] ` <ba0e2f728d7b2a0bbf5c0f44d907a4c7e3723501.1537367701.git.berto@igalia.com>
2018-10-08 2:48 ` [Qemu-devel] [PATCH 14/14] block: Stop passing flags to bdrv_reopen_queue_child() Max Reitz
2018-10-08 18:13 ` Alberto Garcia
2018-10-08 18:46 ` Max Reitz
2018-10-09 8:44 ` 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=5466eec0-4cc6-5717-945d-6e252e30c32d@redhat.com \
--to=mreitz@redhat.com \
--cc=berto@igalia.com \
--cc=jcody@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).