[dm-devel] [PATCH v3 09/10] libmultipath: check_rdac(): pre-check in hwtable

Martin Wilck mwilck at suse.com
Mon Mar 18 11:24:44 UTC 2019


Currently check_rdac() always runs an SG_IO for VPD 0xc9 to check
if the storage supports RDAC. This is an extra IO, and may cause
annoying error messages on the storage side for non-RDAC arrays.
Do not use the RDAC override for arrays that have legacy configuration
to use a checker other than "rdac". For "unkown" devices with no checker
configured in either the hwtable or multipath.conf, the VPD call will
be tried.

Cc: Steve.Schremmer at netapp.com
Cc: NetApp RDAC team <ng-eseries-upstream-maintainers at netapp.com>
Cc: Hannes Reinecke <hare at suse.com>
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 libmultipath/propsel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index caf55b68..e6263e9b 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -478,9 +478,14 @@ check_rdac(struct path * pp)
 {
 	int len;
 	char buff[44];
+	const char *checker_name;
 
 	if (pp->bus != SYSFS_BUS_SCSI)
 		return 0;
+	/* Avoid ioctl if this is likely not an RDAC array */
+	if (__do_set_from_hwe(checker_name, pp, checker_name) &&
+	    strcmp(checker_name, RDAC))
+		return 0;
 	len = get_vpd_sgio(pp->fd, 0xC9, buff, 44);
 	if (len <= 0)
 		return 0;
-- 
2.21.0




More information about the dm-devel mailing list