qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v5] blockcommit: Reopen base image as RO after abort


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v5] blockcommit: Reopen base image as RO after abort
Date: Fri, 5 Apr 2024 16:16:49 +0300
User-agent: Mozilla Thunderbird

On 04.04.24 12:11, Alexander Ivanov wrote:
If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.

How to reproduce:
   $ virsh snapshot-create-as vm snp1 --disk-only

   *** write something to the disk inside the guest ***

   $ virsh blockcommit vm vda --active --shallow && virsh blockjob vm vda 
--abort
   $ lsof /vzt/vm.qcow2
   COMMAND      PID USER   FD   TYPE DEVICE   SIZE/OFF NODE NAME
   qemu-syst 433203 root   45u   REG  253,0 1724776448  133 /vzt/vm.qcow2
   $ cat /proc/433203/fdinfo/45
   pos:    0
   flags:  02140002 <==== The last 2 means RW mode

If the base image is in RW mode at the end of blockcommit and was in RO
mode before blockcommit, reopen the base BDS in RO.

Signed-off-by: Alexander Ivanov<alexander.ivanov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy<vsementsov@yandex-team.ru>

Thanks, applied to my block branch.

--
Best regards,
Vladimir




reply via email to

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