More debugging output when synchronizing path states
authorHannes Reinecke <hare@suse.de>
Wed, 21 Jan 2009 14:01:38 +0000 (15:01 +0100)
committerHannes Reinecke <hare@suse.de>
Wed, 18 May 2011 08:17:04 +0000 (10:17 +0200)
When synchronizing path state we might end up removing a path.
However, if this path is not in state PATH_DOWN there is an
error somewhere. So modify the messages accordingly.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/structs_vec.c

index fa48e00..e07b5fd 100644 (file)
@@ -471,8 +471,15 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec)
                 */
                if (!pp->sysdev || sysfs_get_dev(pp->sysdev,
                                                 pp->dev_t, BLK_DEV_SIZE)) {
-                       condlog(0, "%s: failed to access path %s", mpp->alias,
-                               pp->sysdev ? pp->sysdev->devpath : pp->dev_t);
+                       if (pp->state != PATH_DOWN) {
+                               condlog(1, "%s: removing valid path %s in state %d",
+                                       mpp->alias,
+                                       pp->sysdev?pp->sysdev->devpath:pp->dev_t, pp->state);
+                       } else {
+                               condlog(3, "%s: failed to access path %s",
+                                       mpp->alias,
+                                       pp->sysdev ? pp->sysdev->devpath : pp->dev_t);
+                       }
                        count++;
                        vector_del_slot(mpp->paths, i);
                        i--;