[libvirt] [PATCH] storage: fix the error message when encrypted raw volume resize

Shivaprasad G Bhat posted 1 patch 5 years, 8 months ago
Failed in applying to current master (apply log)
Test syntax-check passed
src/storage/storage_util.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] storage: fix the error message when encrypted raw volume resize
Posted by Shivaprasad G Bhat 5 years, 8 months ago
The vol-dumpxml shows the volume target format type as raw for
encrypted volumes. The error message when attempting to resize
with prealloc is confusing here.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
---
 src/storage/storage_util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 42a9b6abf0..2abedb24b0 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -2343,7 +2343,7 @@ virStorageBackendVolResizeLocal(virStoragePoolObjPtr pool,
     } else if (vol->target.format == VIR_STORAGE_FILE_RAW && vol->target.encryption) {
         if (pre_allocate) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                           _("preallocate is only supported for raw "
+                           _("preallocate is only supported for unencrypted raw "
                              "type volume"));
             return -1;
         }

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] storage: fix the error message when encrypted raw volume resize
Posted by John Ferlan 5 years, 8 months ago

On 08/20/2018 02:27 AM, Shivaprasad G Bhat wrote:
> The vol-dumpxml shows the volume target format type as raw for
> encrypted volumes. The error message when attempting to resize
> with prealloc is confusing here.
> 
> Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
> ---
>  src/storage/storage_util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
> index 42a9b6abf0..2abedb24b0 100644
> --- a/src/storage/storage_util.c
> +++ b/src/storage/storage_util.c
> @@ -2343,7 +2343,7 @@ virStorageBackendVolResizeLocal(virStoragePoolObjPtr pool,
>      } else if (vol->target.format == VIR_STORAGE_FILE_RAW && vol->target.encryption) {
>          if (pre_allocate) {
>              virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> -                           _("preallocate is only supported for raw "
> +                           _("preallocate is only supported for unencrypted raw "
>                               "type volume"));

Reviewed-by: John Ferlan <jferlan@redhat.com>

NB: I adjusted the text to be "for an unencrypted raw volume" and pushed.

Tks,

John

>              return -1;
>          }
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list