diff options
author | Alexander Ivanov <alexander.ivanov@virtuozzo.com> | 2024-04-04 11:11:36 +0200 |
---|---|---|
committer | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2024-05-28 15:52:15 +0300 |
commit | 7d99ae59a20c4448732a3fb204e31915816048d6 (patch) | |
tree | b5c6aaed032df10b56aefe9bded0bb52420fa261 /cpu-common.c | |
parent | ad10b4badc1dd5b28305f9b9f1168cf0aa3ae946 (diff) |
blockcommit: Reopen base image as RO after abort
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>
Message-Id: <20240404091136.129811-1-alexander.ivanov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'cpu-common.c')
0 files changed, 0 insertions, 0 deletions