Synchronize dm states for IO errors
authorHannes Reinecke <hare@suse.de>
Thu, 20 Mar 2008 09:50:40 +0000 (10:50 +0100)
committerHannes Reinecke <hare@suse.de>
Wed, 4 May 2011 08:00:40 +0000 (10:00 +0200)
When a real hardware IO error occurs, the path checker will return
PATH_UP, causing the dm state from the kernel never to be updated.

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

index 71d2bb3..f342dc9 100644 (file)
@@ -1059,8 +1059,12 @@ check_path (struct vectors * vecs, struct path * pp)
                        enable_group(pp);
        }
        else if (newstate == PATH_UP || newstate == PATH_GHOST) {
                        enable_group(pp);
        }
        else if (newstate == PATH_UP || newstate == PATH_GHOST) {
-               LOG_MSG(4, checker_message(&pp->checker));
-               if (pp->checkint != conf->max_checkint) {
+               if (pp->dmstate == PSTATE_FAILED ||
+                   pp->dmstate == PSTATE_UNDEF) {
+                       /* Clear IO errors */
+                       reinstate_path(pp, 0);
+               } else {
+                       LOG_MSG(4, checker_message(&pp->checker));
                        /*
                         * double the next check delay.
                         * max at conf->max_checkint
                        /*
                         * double the next check delay.
                         * max at conf->max_checkint