[PATCH 12/24] conf: backup: Don't explicitly forbid backup of read-only disk

Peter Krempa posted 24 patches 5 years, 7 months ago
[PATCH 12/24] conf: backup: Don't explicitly forbid backup of read-only disk
Posted by Peter Krempa 5 years, 7 months ago
Users may want to use this to create a full backup or even incremental
if the checkpoints are pre existing. We still will not allow to create a
checkpoint on a read-only disk as that makes no sense.

https://bugzilla.redhat.com/show_bug.cgi?id=1840053

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/conf/backup_conf.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c
index 92106d8aaa..e9eea5af75 100644
--- a/src/conf/backup_conf.c
+++ b/src/conf/backup_conf.c
@@ -411,13 +411,6 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDefPtr disk,
                            _("disk '%s' has no media"), disk->name);
             return -1;
         }
-    } else if (src->readonly) {
-        if (disk->store) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("backup of readonly disk '%s' makes no sense"),
-                           disk->name);
-            return -1;
-        }
     } else if (!disk->store) {
         if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_FILE) {
             if (!(disk->store = virStorageSourceNew()))
-- 
2.26.2

Re: [PATCH 12/24] conf: backup: Don't explicitly forbid backup of read-only disk
Posted by Eric Blake 5 years, 7 months ago
On 7/2/20 9:39 AM, Peter Krempa wrote:
> Users may want to use this to create a full backup or even incremental
> if the checkpoints are pre existing. We still will not allow to create a

pre-existing

> checkpoint on a read-only disk as that makes no sense.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1840053
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/conf/backup_conf.c | 7 -------
>   1 file changed, 7 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c
> index 92106d8aaa..e9eea5af75 100644
> --- a/src/conf/backup_conf.c
> +++ b/src/conf/backup_conf.c
> @@ -411,13 +411,6 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDefPtr disk,
>                              _("disk '%s' has no media"), disk->name);
>               return -1;
>           }
> -    } else if (src->readonly) {
> -        if (disk->store) {
> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                           _("backup of readonly disk '%s' makes no sense"),
> -                           disk->name);
> -            return -1;
> -        }
>       } else if (!disk->store) {
>           if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_FILE) {
>               if (!(disk->store = virStorageSourceNew()))
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org