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>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user