Re: [PATCH 01/22] libmultipath: rename dm_map_present_by_wwid() and add outputs

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

 



On Sat, 2024-07-13 at 02:04 -0400, Benjamin Marzinski wrote:
> add arguments to dm_map_present_by_wwid() to allow optionally
> fetching
> the device name and minor number for the devices found by WWID. 
> These
> will be used by a later patch. Since it can now also be used to get
> the
> name and minor number of a device from its WWID, rename it to
> dm_find_map_by_wwid()
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
> ---
>  libmultipath/devmapper.c | 16 ++++++++++++----
>  libmultipath/devmapper.h |  2 +-
>  libmultipath/valid.c     |  2 +-
>  tests/valid.c            | 12 ++++++------
>  4 files changed, 20 insertions(+), 12 deletions(-)
> 
> diff --git a/libmultipath/devmapper.h b/libmultipath/devmapper.h
> index c28991fb..1de694c9 100644
> --- a/libmultipath/devmapper.h
> +++ b/libmultipath/devmapper.h
> @@ -132,7 +132,7 @@ int dm_simplecmd_flush (int task, const char
> *name, uint16_t udev_flags);
>  int dm_simplecmd_noflush (int task, const char *name, uint16_t
> udev_flags);
>  int dm_addmap_create (struct multipath *mpp, char *params);
>  int dm_addmap_reload (struct multipath *mpp, char *params, int
> flush);
> -int dm_map_present_by_wwid(const char *uuid);
> +int dm_find_map_by_wwid(const char *wwid, char *name, int *minor);
> 

Nitpick: According to my personal taste, it would be cleaner to pass in
the entire dm_info structure rather than just the minor number. One day
we may need other fields as well.

Martin






[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux