Re: [PATCH 7/7] multipath: print sysfs state in fast list mode

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

 



Hi Ben,

On Wed, 2018-02-07 at 16:49 -0600, Benjamin Marzinski wrote:
> commit b123e711ea2a4b471a98ff5e26815df3773636b5 "libmultipath:
> cleanup
> orphan device states" stopped multipathd from showing old state for
> orphan paths by checking if pp->mpp was set, and only printing the
> state
> if it was.   Unfortunately, when "multipath -l" is run, pp->mpp isn't
> set. While the checker state isn't checked and shouldn't be printed
> with
> "-l", the sysfs state can be, and was before b123e711. This patch
> sets
> pp->mpp in fast list mode, so that the sysfs state gets printed.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
> ---
>  multipath/main.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/multipath/main.c b/multipath/main.c
> index bffe065..1799fd5 100644
> --- a/multipath/main.c
> +++ b/multipath/main.c
> @@ -149,7 +149,7 @@ usage (char * progname)
>  }
>  
>  static int
> -update_paths (struct multipath * mpp)
> +update_paths (struct multipath * mpp, int quick)
>  {
>  	int i, j;
>  	struct pathgroup * pgp;
> @@ -164,6 +164,10 @@ update_paths (struct multipath * mpp)
>  			continue;
>  
>  		vector_foreach_slot (pgp->paths, pp, j) {
> +			if (quick) {
> +				pp->mpp = mpp;
> +				continue;
> +			}
>  			if (!strlen(pp->dev)) {
>  				if (devt2devname(pp->dev, 

Shouldn't you check whether the paths are still present in sysfs, like
the code for the general case (quick == false) does?

Regards
Martin

-- 
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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




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

  Powered by Linux