summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index b243e78951b..3b4b390d144 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -253,7 +253,7 @@ out:
return ret;
}
-static int
+int
glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
{
int32_t ret = -1;
@@ -800,6 +800,7 @@ glusterd_op_create_volume (gd1_mgmt_stage_op_req *req)
i++;
}
list_add_tail (&volinfo->vol_list, &priv->volumes);
+ volinfo->version++;
ret = glusterd_store_create_volume (volinfo);
@@ -811,6 +812,10 @@ glusterd_op_create_volume (gd1_mgmt_stage_op_req *req)
goto out;
+ ret = glusterd_volume_compute_cksum (volinfo);
+ if (ret)
+ goto out;
+
out:
return ret;
}
@@ -942,6 +947,12 @@ glusterd_op_add_brick (gd1_mgmt_stage_op_req *req)
goto out;
}
+ volinfo->version++;
+
+ ret = glusterd_volume_compute_cksum (volinfo);
+ if (ret)
+ goto out;
+
ret = glusterd_store_update_volume (volinfo);
if (ret)
@@ -1879,6 +1890,12 @@ glusterd_op_remove_brick (gd1_mgmt_stage_op_req *req)
goto out;
}
+ volinfo->version++;
+
+ ret = glusterd_volume_compute_cksum (volinfo);
+ if (ret)
+ goto out;
+
ret = glusterd_store_update_volume (volinfo);
if (ret)