[dm-devel] multipath bug and patch

James Shoemaker james at dhlake.com
Fri Nov 4 16:54:05 UTC 2016


   I can add those checks instead.  I'll look at it this weekend and make
up a new set of patches.  I'll admit my fix is a bit of a hack.

   If I remember I did it this way to reduce the amount of change
required.  I hacked this in something like 2 years ago and kept telling
myself I needed to push a change upstream so I didn't have to keep
rebuilding libmultipath every time I updated things.

   I'll have a cleaner patch sent up this weekend.

James Shoemaker

On Fri, Nov 4, 2016 at 11:45 AM, Benjamin Marzinski <bmarzins at redhat.com>
wrote:

> On Thu, Nov 03, 2016 at 01:34:17PM -0500, James Shoemaker wrote:
> >       If a device returns an empty string for inquiry data the current
> >    multipath tool ignores it on reload.  I added the following patch and
> I
> >    can hotplug these devices that don't return all the proper data.
>
> I feel like returning "none" if you try and strchop an empty string is
> pretty surprising behavior. I'd rather see this dealt with in the
> function that has problems with the empty string.
>
> -Ben
>
> >
> >    diff --git a/libmultipath/util.c b/libmultipath/util.c
> >    index ac0d1b2..045e660 100644
> >    --- a/libmultipath/util.c
> >    +++ b/libmultipath/util.c
> >    @@ -17,6 +17,10 @@ strchop(char *str)
> >
> >            for (i=strlen(str)-1; i >=0 && isspace(str[i]); --i) ;
> >            str[++i] = '\0';
> >    +       if(strlen(str)==0)
> >    +       {
> >    +               strcpy(str,"none");
> >    +       }
> >            return strlen(str);
> >     }
> >
> >    James Shoemaker
>
> > --
> > dm-devel mailing list
> > dm-devel at redhat.com
> > https://www.redhat.com/mailman/listinfo/dm-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161104/c2f33187/attachment.htm>


More information about the dm-devel mailing list