[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] blockdev: fix drive-backup transaction endless drained secti

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH] blockdev: fix drive-backup transaction endless drained section
Date: Wed, 7 Jul 2021 16:35:56 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Forgotten thing :(

Kevin, could you please queue it in your block branch? For me not to bother 
Peter with one-patch pull request.

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

Fixes: 2288ccfac96281c316db942d10e3f921c1373064
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/399
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);
+ state->bs = bs;
      /* Paired with .clean() */
@@ -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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]