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

Michal Privoznik posted 1 patch 5 years, 2 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/46a77f404c7c40716378473a5be3736998fa2e2f.1548688086.git.mprivozn@redhat.com
src/qemu/qemu_migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[libvirt] [PATCH] qemu: Assume migration with iscsi migration is safe
Posted by Michal Privoznik 5 years, 2 months ago
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Assume migration with iscsi migration is safe
Posted by Peter Krempa 5 years, 2 months ago
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.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list