[sheepdog] [PATCH v9 2/7] move enum cluster_join_result from sheep/cluster.h to include/internal_proto.h
Hitoshi Mitake
mitake.hitoshi at gmail.com
Fri Mar 29 16:01:48 CET 2013
From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
enum cluster_join_result is also used by shepherd. So this patch
moves it from sheep/ to include/.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
include/internal_proto.h | 20 ++++++++++++++++++++
sheep/cluster.h | 15 ---------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/include/internal_proto.h b/include/internal_proto.h
index 6f1fdb3..00660e9 100644
--- a/include/internal_proto.h
+++ b/include/internal_proto.h
@@ -229,4 +229,24 @@ struct vdi_op_message {
uint8_t data[0];
};
+enum cluster_join_result {
+ /* Success */
+ CJ_RES_SUCCESS,
+
+ /* Fail to join. The joining node has an invalid epoch. */
+ CJ_RES_FAIL,
+
+ /*
+ * Fail to join. The joining node should be added after the cluster
+ * start working.
+ */
+ CJ_RES_JOIN_LATER,
+
+ /*
+ * Transfer mastership. The joining node has a newer epoch, so this
+ * node will leave the cluster (restart later).
+ */
+ CJ_RES_MASTER_TRANSFER,
+};
+
#endif /* __INTERNAL_PROTO_H__ */
diff --git a/sheep/cluster.h b/sheep/cluster.h
index 04ea01d..0f6164c 100644
--- a/sheep/cluster.h
+++ b/sheep/cluster.h
@@ -26,21 +26,6 @@
/* maximum payload size sent in ->notify and ->unblock */
#define SD_MAX_EVENT_BUF_SIZE (128 * 1024) /* 128k */
-enum cluster_join_result {
- CJ_RES_SUCCESS, /* Success */
- CJ_RES_FAIL, /* Fail to join. The joining node has an invalidepoch. */
- /*
- * Fail to join. The joining node should be added after the cluster
- * start working.
- */
- CJ_RES_JOIN_LATER,
- /*
- * Transfer mastership. The joining node has a newer epoch, so this
- * node will leave the cluster (restart later).
- */
- CJ_RES_MASTER_TRANSFER,
-};
-
struct cluster_driver {
const char *name;
--
1.7.5.1
More information about the sheepdog
mailing list