Skip to contentSkip to conversation

configlet specifications being ignored in multipath-tools-0.4.3

DISCUSSION Applied lan 2 participants 2 messages Mar 23, 2005 1 message not in the archive Device mapper

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

lan

author
#1 lore raw

For multipath-tools-0.4.3, when running 'multipath' to setup multipath devices, it appears that some configlet specifications are being ignored because the select_getXXX calls (e.g. select_getprio, select_checkfn, select_getuid) made in devinfo assume that the path's hwe pointer is already initialized, but this does not happen until after devinfo is called. Thus, the path ends up being intialized with the default values instead of configlet-specificed values. The following change appears to fix this problem. Please excuse me if this problem has already been resolved.

Thanks!
Lan

diff -Naur multipath-tools-0.4.3/multipath/devinfo.c multipath-tools-0.4.3-patched/multipath/devinfo.c
--- multipath-tools-0.4.3/multipath/devinfo.c 2005-03-04
16:32:41.000000000 -0800
+++ multipath-tools-0.4.3-patched/multipath/devinfo.c 2005-03-23
03:49:13.000000000 -0800
@@ -422,6 +422,9 @@

        pp->claimed = get_claimed(pp->dev_t);
        dbg("claimed = %i", pp->claimed);

+ /* get and store hwe pointer */
+ pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id);
+

        /*
         * get path state, no message collection, no context
         */

diff -Naur multipath-tools-0.4.3/multipath/main.c
multipath-tools-0.4.3-patched/multipath/main.c
--- multipath-tools-0.4.3/multipath/main.c 2005-03-19
05:44:11.000000000 -0800
+++ multipath-tools-0.4.3-patched/multipath/main.c 2005-03-23
00:16:31.000000000 -0800
@@ -157,8 +157,6 @@

                        free(curpath);
                        continue;
                }
-               curpath->hwe = find_hwe(conf->hwtable, curpath->vendor_id,
-                                                     curpath->product_id);
                vector_alloc_slot(pathvec);
                vector_set_slot(pathvec, curpath);
        }
#2 lore raw

Thanks, applied, with the missing header inclusion in devinfo.c

Regards,
cvaroqui

Quoted 44 lines · lan

For multipath-tools-0.4.3, when running 'multipath' to setup multipath devices, it appears that some configlet specifications are being ignored because the select_getXXX calls (e.g. select_getprio, select_checkfn, select_getuid) made in devinfo assume that the path's hwe pointer is already initialized, but this does not happen until after devinfo is called. Thus, the path ends up being intialized with the default values instead of configlet-specificed values. The following change appears to fix this problem. Please excuse me if this problem has already been resolved.

Thanks!
Lan

diff -Naur multipath-tools-0.4.3/multipath/devinfo.c multipath-tools-0.4.3-patched/multipath/devinfo.c
--- multipath-tools-0.4.3/multipath/devinfo.c 2005-03-04
16:32:41.000000000 -0800
+++ multipath-tools-0.4.3-patched/multipath/devinfo.c 2005-03-23
03:49:13.000000000 -0800

(quoted diff) +3 -0
@@ -422,6 +422,9 @@
        pp->claimed = get_claimed(pp->dev_t);
        dbg("claimed = %i", pp->claimed);
 
+       /* get and store hwe pointer */
+        pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id);
+
        /*
         * get path state, no message collection, no context
         */

diff -Naur multipath-tools-0.4.3/multipath/main.c
multipath-tools-0.4.3-patched/multipath/main.c
--- multipath-tools-0.4.3/multipath/main.c 2005-03-19
05:44:11.000000000 -0800
+++ multipath-tools-0.4.3-patched/multipath/main.c 2005-03-23
00:16:31.000000000 -0800

(quoted diff) +0 -2
@@ -157,8 +157,6 @@
                        free(curpath);
                        continue;
                }
-               curpath->hwe = find_hwe(conf->hwtable, curpath->vendor_id,
-                                                     curpath->product_id);
                vector_alloc_slot(pathvec);
                vector_set_slot(pathvec, curpath);
        }