libmultipath: tur checker: leave unsupported paths alone
authorMartin Wilck <mwilck@suse.com>
Fri, 2 Nov 2018 12:21:20 +0000 (13:21 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 14 Nov 2018 07:21:40 +0000 (08:21 +0100)
A checker shouldn't set the path state to PATH_DOWN if it fails
to obtain information about the path in the first place. Add logic
to the checker to distinguish a failed path from an unsupported path.

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/checkers/tur.c

index 22734be..a27474f 100644 (file)
@@ -125,6 +125,10 @@ retry:
        io_hdr.timeout = timeout * 1000;
        io_hdr.pack_id = 0;
        if (ioctl(fd, SG_IO, &io_hdr) < 0) {
+               if (errno == ENOTTY) {
+                       *msgid = CHECKER_MSGID_UNSUPPORTED;
+                       return PATH_WILD;
+               }
                *msgid = CHECKER_MSGID_DOWN;
                return PATH_DOWN;
        }