summaryrefslogtreecommitdiffstats
path: root/daemons/cmirrord/local.c
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2012-04-26 17:30:49 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2012-04-26 17:30:49 +0000
commite5b9338ada7152672000016861ef06f4af2160aa (patch)
tree44d9767addcf091253b57dbf50d2ecff28c25c43 /daemons/cmirrord/local.c
parent34fbbfe34ee2251cc95263e27c5282d125f47779 (diff)
downloadlvm2-e5b9338ada7152672000016861ef06f4af2160aa.tar.gz
lvm2-e5b9338ada7152672000016861ef06f4af2160aa.tar.xz
lvm2-e5b9338ada7152672000016861ef06f4af2160aa.zip
Fix bug in cmirror that caused incorrect status info to print on some nodes.
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.
Diffstat (limited to 'daemons/cmirrord/local.c')
-rw-r--r--daemons/cmirrord/local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/cmirrord/local.c b/daemons/cmirrord/local.c
index 26dbff9c..8601cfd2 100644
--- a/daemons/cmirrord/local.c
+++ b/daemons/cmirrord/local.c
@@ -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);