Re: [PATCH 2/3] Revert "storage: Validate the device formats at logical startup"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 01/12/2017 09:24 AM, Peter Krempa wrote:
> The check is pointless since LVM is capable to detect it's own members
> and the check is flawed as it would fail if neither libblkid nor parted
> is installed.
> 
> We don't really need to babysit LVM in this way.
> 
> This reverts commit cb38b6cbc7e35e7ee92a7f54828f21261227d17a.
> ---
>  src/storage/storage_backend_logical.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 

Ambivalent on this one - the virStorageBackendDeviceIsEmpty was added
here and in the previous patch for FS mainly because Disk pools had a
similar check. Since each uses some sort of device backend onto which a
specific format (as defined by the pool) should be written - it just
seem logical to check.

You call it babysitting - I call it validation.

John

> diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
> index 85e080bf9..6a6720e22 100644
> --- a/src/storage/storage_backend_logical.c
> +++ b/src/storage/storage_backend_logical.c
> @@ -743,19 +743,6 @@ static int
>  virStorageBackendLogicalStartPool(virConnectPtr conn ATTRIBUTE_UNUSED,
>                                    virStoragePoolObjPtr pool)
>  {
> -    size_t i;
> -
> -    /* Let's make sure the pool's devices are properly formatted */
> -    for (i = 0; i < pool->def->source.ndevice; i++) {
> -        const char *path = pool->def->source.devices[i].path;
> -
> -        /* The blkid FS and Part probing code doesn't know "lvm2" (this
> -         * pool's only format type), but it does know "LVM2_member", so
> -         * we'll pass that here */
> -        if (!virStorageBackendDeviceIsEmpty(path, "LVM2_member", false))
> -            return -1;
> -    }
> -
>      /* Let's make sure that the pool's name matches the pvs output and
>       * that the pool's source devices match the pvs output.
>       */
> 

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux