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

Re: [rhel6-branch 4/4] mpath: filter out the slave devices and their partitions.



Please do use udev_device_is_dm_mpath instead of adding another function
to do the same thing. I forgot that function had made it to
rhel6-branch.

Dave

> diff --git a/storage/udev.py b/storage/udev.py
> index 59b7519..7ba5a9c 100644
> --- a/storage/udev.py
> +++ b/storage/udev.py
> @@ -472,6 +472,14 @@ def udev_device_is_dmraid_partition(info, devicetree):
>  
>      return False
>  
> +def udev_device_is_multipath(info):
> +    """ Return True if the device is a multipath device or a partition of one."""
> +    if not udev_device_is_dm(info):
> +        return False
> +    if udev_device_get_name(info).startswith("mpath"):
> +        return True
> +    return False
> +
>  def udev_device_is_multipath_partition(info, devicetree):
>      """ Return True if the device is a partition of a multipath device. """
>      if not udev_device_is_dm(info):



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