]> sourceware.org Git - lvm2.git/commitdiff
Fix bug in cmirror that caused incorrect status info to print on some nodes.
authorJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 26 Apr 2012 17:30:49 +0000 (17:30 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 26 Apr 2012 17:30:49 +0000 (17:30 +0000)
Looking at the code in cmirrord/local.c, we can see the various different
request types handled in different ways.  Some information that is non-changing
does not need to go around the cluster and can be short-circuited.  For
example, once the cluster mirror is in-sync, it is pointless to continue
sending that query around the cluster.  We can save network bandwidth and reply
directly back to the kernel.  When it comes to status information, there are
two types 'TABLE' and 'INFO'.  The 'TABLE' information never changes and
belongs to the group of requests that can be safely short-circuited.  The
'STATUS' information can change - and will change if a device fails.  Thus it
cannot be short-circuited, but this is exactly what was found.  The 'STATUS'
information request was being short-circuited and therefore never reporting the
failure condition to anyone other than the "server" that experienced it
directly.

WHATS_NEW
daemons/cmirrord/cluster.c
daemons/cmirrord/local.c

index 758657605216339d2d74c02e3efb998a0df446e0..636fae3f2f84d32990da7b1065598f220059cad6 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.96 - 
 ================================
+  Fix bug in cmirror that caused incorrect status info to print on some nodes.
   Remove statement that snapshots cannot be tagged from lvm man page.
   Disallow changing cluster attribute of VG while RAID LVs are active.
   Fix lvconvert error message for non-mergeable volumes.
index 0a782401e3f4153f223dc78cefc0089ef961e3cf..3a6bb038db0a78da8ef69c6b9d4ceeb2de1ef063 100644 (file)
@@ -1231,11 +1231,11 @@ out:
                                   _RQ_TYPE(rq->u_rq.request_type),
                                   rq->originator, (response) ? "YES" : "NO");
                else
-                       LOG_SPRINT(match, "SEQ#=%u, UUID=%s, TYPE=%s, ORIG=%u, RESP=%s, RSPR=%u",
+                       LOG_SPRINT(match, "SEQ#=%u, UUID=%s, TYPE=%s, ORIG=%u, RESP=%s, RSPR=%u, error=%d",
                                   rq->u_rq.seq, SHORT_UUID(rq->u_rq.uuid),
                                   _RQ_TYPE(rq->u_rq.request_type),
                                   rq->originator, (response) ? "YES" : "NO",
-                                  nodeid);
+                                  nodeid, rq->u_rq.error);
        }
 }
 
index 26dbff9ce610f0ae1d3dba6d0c4b4d2511019d1d..8601cfd2709eeaeda0a096ddd8ef95fc2bbefe0a 100644 (file)
@@ -237,7 +237,6 @@ static int do_local_work(void *data __attribute__((unused)))
        case DM_ULOG_GET_REGION_SIZE:
        case DM_ULOG_IN_SYNC:
        case DM_ULOG_GET_SYNC_COUNT:
-       case DM_ULOG_STATUS_INFO:
        case DM_ULOG_STATUS_TABLE:
        case DM_ULOG_PRESUSPEND:
                /* We do not specify ourselves as server here */
@@ -273,6 +272,7 @@ static int do_local_work(void *data __attribute__((unused)))
        case DM_ULOG_MARK_REGION:
        case DM_ULOG_GET_RESYNC_WORK:
        case DM_ULOG_SET_REGION_SYNC:
+       case DM_ULOG_STATUS_INFO:
        case DM_ULOG_IS_REMOTE_RECOVERING:
        case DM_ULOG_POSTSUSPEND:
                r = cluster_send(rq);
This page took 0.041621 seconds and 5 git commands to generate.