From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH 1/2] block/backup-top: fix failure path
Date: Mon, 20 Jan 2020 17:50:38 +0100 [thread overview]
Message-ID: <dc4ca699-6fdc-19d1-7e54-fd235795e60e@redhat.com> (raw)
In-Reply-To: <20200116155452.30972-2-vsementsov@virtuozzo.com>
[-- Attachment #1.1: Type: text/plain, Size: 797 bytes --]
On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote:
> We can't access top after call bdrv_backup_top_drop, as it is already
> freed at this time.
>
> Also, no needs to unref target child by hand, it will be unrefed on
> bdrv_close() automatically.
>
> So, just do bdrv_backup_top_drop if append succeed and one bdrv_unref
> otherwise.
>
> Note, that in !appended case bdrv_unref(top) moved into drained section
> on source. It doesn't really matter, but just for code simplicity.
>
> Fixes: 7df7868b96404
> Cc: qemu-stable@nongnu.org # v4.2.0
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/backup-top.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-01-20 16:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 15:54 [PATCH 0/2] backup-top failure path fix Vladimir Sementsov-Ogievskiy
2020-01-16 15:54 ` [PATCH 1/2] block/backup-top: fix failure path Vladimir Sementsov-Ogievskiy
2020-01-20 16:50 ` Max Reitz [this message]
2020-01-16 15:54 ` [PATCH 2/2] iotests: add test for backup-top failure on permission activation Vladimir Sementsov-Ogievskiy
2020-01-20 17:04 ` Max Reitz
2020-01-20 17:20 ` Vladimir Sementsov-Ogievskiy
2020-01-21 9:14 ` Max Reitz
2020-01-21 9:23 ` Vladimir Sementsov-Ogievskiy
2020-01-21 9:41 ` Max Reitz
2020-01-21 10:40 ` Vladimir Sementsov-Ogievskiy
2020-01-21 12:39 ` Max Reitz
2020-01-21 12:53 ` Vladimir Sementsov-Ogievskiy
2020-01-21 13:29 ` Max Reitz
2020-01-21 13:48 ` Vladimir Sementsov-Ogievskiy
2020-01-21 13:51 ` Max Reitz
2020-01-21 13:55 ` Vladimir Sementsov-Ogievskiy
2020-01-21 14:01 ` Max Reitz
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=dc4ca699-6fdc-19d1-7e54-fd235795e60e@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).