diff options
author | Alex Elder <elder@inktank.com> | 2013-02-15 12:42:30 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-02-18 13:20:13 -0500 |
commit | 4b568b1aaf23d0ce64b98d01d5ad1bcc7694440a (patch) | |
tree | ae843df0bdb5f5c4c008fc0dbee36c4608cde905 /net | |
parent | 0315a7770983bbe69211efed1aaee08324acd54c (diff) |
libceph: add ceph_osd_state_name()
Add the definition of ceph_osd_state_name(), to match its
counterpart in user space.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/ceph_strings.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/ceph/ceph_strings.c b/net/ceph/ceph_strings.c index 3fbda04de29c..833075cff4e8 100644 --- a/net/ceph/ceph_strings.c +++ b/net/ceph/ceph_strings.c | |||
@@ -68,6 +68,21 @@ const char *ceph_osd_op_name(int op) | |||
68 | return "???"; | 68 | return "???"; |
69 | } | 69 | } |
70 | 70 | ||
71 | const char *ceph_osd_state_name(int s) | ||
72 | { | ||
73 | switch (s) { | ||
74 | case CEPH_OSD_EXISTS: | ||
75 | return "exists"; | ||
76 | case CEPH_OSD_UP: | ||
77 | return "up"; | ||
78 | case CEPH_OSD_AUTOOUT: | ||
79 | return "autoout"; | ||
80 | case CEPH_OSD_NEW: | ||
81 | return "new"; | ||
82 | default: | ||
83 | return "???"; | ||
84 | } | ||
85 | } | ||
71 | 86 | ||
72 | const char *ceph_pool_op_name(int op) | 87 | const char *ceph_pool_op_name(int op) |
73 | { | 88 | { |