The kernel prints an error message when a bio-based multipath device
sets a hardware handler, since bio-based devices only support using
the already attached hardware handler as-is. Change select_hwhandler()
to not set a hardware handler for bio-based devices.

Signed-off-by: Benjamin Marzinski <[email protected]>
---
 libmultipath/propsel.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index 277214f6..0202aaef 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -560,6 +560,11 @@ int select_hwhandler(struct config *conf, struct multipath 
*mp)
 
        dh_state = &handler[2];
 
+       if (mp->queue_mode == QUEUE_MODE_BIO) {
+               mp->hwhandler = DEFAULT_HWHANDLER;
+               origin = "(setting: disabled due to \"queue_mode bio\")";
+               goto set;
+       }
        /*
         * TPGS_UNDEF means that ALUA support couldn't determined either way
         * yet, probably because the path was always down.
@@ -600,6 +605,7 @@ out:
                mp->hwhandler = DEFAULT_HWHANDLER;
                origin = tpgs_origin;
        }
+set:
        mp->hwhandler = strdup(mp->hwhandler);
        condlog(3, "%s: hardware_handler = \"%s\" %s", mp->alias, mp->hwhandler,
                origin);
-- 
2.53.0


Reply via email to