mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:16:53 +07:00
7a6fdeb2b1
On Mon, Dec 22, 2014 at 5:35 PM, Sage Weil <sage@newdream.net> wrote: > On Mon, 22 Dec 2014, Ilya Dryomov wrote: >> Actually, pool op stuff has been unused for over two years - looks like >> it was added for rbd create_snap and that got ripped out in 2012. It's >> unlikely we'd ever need to manage pools or snaps from the kernel client >> so I think it makes sense to nuke it. Sage? > > Yep! Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
45 lines
866 B
C
45 lines
866 B
C
/*
|
|
* Ceph string constants
|
|
*/
|
|
#include <linux/module.h>
|
|
#include <linux/ceph/types.h>
|
|
|
|
const char *ceph_entity_type_name(int type)
|
|
{
|
|
switch (type) {
|
|
case CEPH_ENTITY_TYPE_MDS: return "mds";
|
|
case CEPH_ENTITY_TYPE_OSD: return "osd";
|
|
case CEPH_ENTITY_TYPE_MON: return "mon";
|
|
case CEPH_ENTITY_TYPE_CLIENT: return "client";
|
|
case CEPH_ENTITY_TYPE_AUTH: return "auth";
|
|
default: return "unknown";
|
|
}
|
|
}
|
|
|
|
const char *ceph_osd_op_name(int op)
|
|
{
|
|
switch (op) {
|
|
#define GENERATE_CASE(op, opcode, str) case CEPH_OSD_OP_##op: return (str);
|
|
__CEPH_FORALL_OSD_OPS(GENERATE_CASE)
|
|
#undef GENERATE_CASE
|
|
default:
|
|
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 "???";
|
|
}
|
|
}
|