From 60a8f17e2fb5c379d0ab8aad8c83959ba037103a Mon Sep 17 00:00:00 2001 From: Packit Service Date: Apr 07 2021 22:14:39 +0000 Subject: Apply patch 0034-libmultipath-fix-checker-detection-for-nvme-devices.patch patch_name: 0034-libmultipath-fix-checker-detection-for-nvme-devices.patch present_in_specfile: true location_in_specfile: 34 --- diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 83a41a4..aa5942c 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -887,6 +887,12 @@ detect_alua(struct path * pp) int tpgs; unsigned int timeout; + + if (pp->bus != SYSFS_BUS_SCSI) { + pp->tpgs = TPGS_NONE; + return; + } + if (sysfs_get_timeout(pp, &timeout) <= 0) timeout = DEF_TIMEOUT; diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c index 897e48c..d362beb 100644 --- a/libmultipath/propsel.c +++ b/libmultipath/propsel.c @@ -521,7 +521,9 @@ int select_checker(struct config *conf, struct path *pp) if (check_rdac(pp)) { ckr_name = RDAC; goto out; - } else if (path_get_tpgs(pp) != TPGS_NONE) { + } + path_get_tpgs(pp); + if (pp->tpgs != TPGS_NONE && pp->tpgs != TPGS_UNDEF) { ckr_name = TUR; goto out; }