qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, armbru@redhat.com, mreitz@redhat.com,
	kwolf@redhat.com, jsnow@redhat.com, eblake@redhat.com,
	incoming+qemu-project-qemu-11167699-5rxbjn6o3eu8n4pzsbiyd55wo-issue-399@incoming.gitlab.com
Subject: Re: [PATCH] blockdev: fix drive-backup transaction endless drained section
Date: Tue, 8 Jun 2021 20:24:17 +0300	[thread overview]
Message-ID: <e5e2f2b2-9dbd-0aaa-8c20-aa38ed168acc@virtuozzo.com> (raw)
In-Reply-To: <20210608171852.250775-1-vsementsov@virtuozzo.com>

[try add gitlab issue email to cc, will see how it work :)]

08.06.2021 20:18, Vladimir Sementsov-Ogievskiy wrote:
> drive_backup_prepare() does bdrv_drained_begin() in hope that
> bdrv_drained_end() will be called in drive_backup_clean(). Still we
> need to set state->bs for this to work. That's done too late: a lot of
> failure paths in drive_backup_prepare() miss setting state->bs. Fix
> that.
> 
> Fixes: 2288ccfac96281c316db942d10e3f921c1373064
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/399

Reported-by: Sergey Zhuravlev

> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>   blockdev.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index f08192deda..094c085962 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1714,6 +1714,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
>       aio_context = bdrv_get_aio_context(bs);
>       aio_context_acquire(aio_context);
>   
> +    state->bs = bs;
>       /* Paired with .clean() */
>       bdrv_drained_begin(bs);
>   
> @@ -1813,8 +1814,6 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
>           }
>       }
>   
> -    state->bs = bs;
> -
>       state->job = do_backup_common(qapi_DriveBackup_base(backup),
>                                     bs, target_bs, aio_context,
>                                     common->block_job_txn, errp);
> 


-- 
Best regards,
Vladimir


  reply	other threads:[~2021-06-08 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 17:18 [PATCH] blockdev: fix drive-backup transaction endless drained section Vladimir Sementsov-Ogievskiy
2021-06-08 17:24 ` Vladimir Sementsov-Ogievskiy [this message]
2021-06-08 17:30   ` Vladimir Sementsov-Ogievskiy
2021-06-08 19:10 ` Eric Blake
2021-07-07 13:35 ` Vladimir Sementsov-Ogievskiy
2021-07-08 12:26   ` Kevin Wolf

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=e5e2f2b2-9dbd-0aaa-8c20-aa38ed168acc@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=incoming+qemu-project-qemu-11167699-5rxbjn6o3eu8n4pzsbiyd55wo-issue-399@incoming.gitlab.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@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).