From c1ace9beea66715084761bf155e0f694fa86397f Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 15 Feb 2013 11:42:30 -0600 Subject: [PATCH] --- yaml --- r: 359663 b: refs/heads/master c: 4b568b1aaf23d0ce64b98d01d5ad1bcc7694440a h: refs/heads/master i: 359661: 0bc79834e7c5c8fa40267765b32db2ed1afb8c4e 359659: af06c2330660f825b29e4cd2f6f0f98210547cc9 359655: 5d4d0aed25a54d97d1885e09ca6e40e3a954a477 359647: 3ddf936e885e6305da11f62da901e8d53cd0110e v: v3 --- [refs] | 2 +- trunk/include/linux/ceph/rados.h | 2 ++ trunk/net/ceph/ceph_strings.c | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 222e16d6c906..a0c347dbacdd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0315a7770983bbe69211efed1aaee08324acd54c +refs/heads/master: 4b568b1aaf23d0ce64b98d01d5ad1bcc7694440a diff --git a/trunk/include/linux/ceph/rados.h b/trunk/include/linux/ceph/rados.h index 9c3b4aaf516b..b65182aba6f7 100644 --- a/trunk/include/linux/ceph/rados.h +++ b/trunk/include/linux/ceph/rados.h @@ -150,6 +150,8 @@ struct ceph_eversion { #define CEPH_OSD_AUTOOUT (1<<2) /* osd was automatically marked out */ #define CEPH_OSD_NEW (1<<3) /* osd is new, never marked in */ +extern const char *ceph_osd_state_name(int s); + /* osd weights. fixed point value: 0x10000 == 1.0 ("in"), 0 == "out" */ #define CEPH_OSD_IN 0x10000 #define CEPH_OSD_OUT 0 diff --git a/trunk/net/ceph/ceph_strings.c b/trunk/net/ceph/ceph_strings.c index 3fbda04de29c..833075cff4e8 100644 --- a/trunk/net/ceph/ceph_strings.c +++ b/trunk/net/ceph/ceph_strings.c @@ -68,6 +68,21 @@ const char *ceph_osd_op_name(int op) return "???"; } +const char *ceph_osd_state_name(int s) +{ + switch (s) { + case CEPH_OSD_EXISTS: + return "exists"; + case CEPH_OSD_UP: + return "up"; + case CEPH_OSD_AUTOOUT: + return "autoout"; + case CEPH_OSD_NEW: + return "new"; + default: + return "???"; + } +} const char *ceph_pool_op_name(int op) {