[sheepdog] [PATCH v10 2/7] include: move enum cluster_join_result from sheep/cluster.h to include/internal_proto.h
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Apr 8 03:47:02 CEST 2013
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 c43855b..3f4abfe 100644
--- a/include/internal_proto.h
+++ b/include/internal_proto.h
@@ -245,4 +245,24 @@ struct sd_md_info {
int nr;
};
+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.2.5
More information about the sheepdog
mailing list