[libvirt] [PATCH] qemu: Assume migration with iscsi migration is safe

If a domain has a disk that is type='network' and protocol='iscsi' then there is no need to require @cache or UNSAFE migration flag. iscsi is a block device not a filesystem after all. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 52aa665640..9a7077f710 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1249,7 +1249,8 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def, else if (rc == 1) continue; } else if (disk->src->type == VIR_STORAGE_TYPE_NETWORK && - disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD) { + (disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD || + disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI)) { continue; } -- 2.19.2

On Mon, Jan 28, 2019 at 16:08:06 +0100, Michal Privoznik wrote:
If a domain has a disk that is type='network' and protocol='iscsi' then there is no need to require @cache or UNSAFE migration flag. iscsi is a block device not a filesystem after all.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 52aa665640..9a7077f710 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1249,7 +1249,8 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def, else if (rc == 1) continue; } else if (disk->src->type == VIR_STORAGE_TYPE_NETWORK && - disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD) { + (disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD || + disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_ISCSI)) {
AFAIK it should be safe to do so for any network protocol as qemu is able to flush buffers which it uses internally prior to handing over.
participants (2)
-
Michal Privoznik
-
Peter Krempa