From 324388ce66271d3baad0f15fe83060846bc8c8d2 Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Tue, 13 Oct 2020 09:27:40 +0800 Subject: [PATCH] mon/mon_types.h: define paxos services indexes using enum Note: It's not proper to use scoped enum type here since the enum value will be used as container index. Signed-off-by: Changcheng Liu --- src/mon/mon_types.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mon/mon_types.h b/src/mon/mon_types.h index 0df66d9217a63..47427fb82668d 100644 --- a/src/mon/mon_types.h +++ b/src/mon/mon_types.h @@ -24,16 +24,19 @@ #include "common/bit_str.h" #include "common/ceph_releases.h" -#define PAXOS_MDSMAP 0 -#define PAXOS_OSDMAP 1 -#define PAXOS_LOG 2 -#define PAXOS_MONMAP 3 -#define PAXOS_AUTH 4 -#define PAXOS_MGR 5 -#define PAXOS_MGRSTAT 6 -#define PAXOS_HEALTH 7 -#define PAXOS_CONFIG 8 -#define PAXOS_NUM 9 +// use as paxos_service index +enum { + PAXOS_MDSMAP, + PAXOS_OSDMAP, + PAXOS_LOG, + PAXOS_MONMAP, + PAXOS_AUTH, + PAXOS_MGR, + PAXOS_MGRSTAT, + PAXOS_HEALTH, + PAXOS_CONFIG, + PAXOS_NUM +}; #define CEPH_MON_ONDISK_MAGIC "ceph mon volume v012" -- 2.39.5