mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
![Ilya Dryomov](/assets/img/avatar_default.png)
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>
44 lines
866 B
C
44 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 "???";
|
|
}
|
|
}
|