2 * Ceph string constants
6 const char *ceph_entity_type_name(int type)
9 case CEPH_ENTITY_TYPE_MDS: return "mds";
10 case CEPH_ENTITY_TYPE_OSD: return "osd";
11 case CEPH_ENTITY_TYPE_MON: return "mon";
12 case CEPH_ENTITY_TYPE_CLIENT: return "client";
13 case CEPH_ENTITY_TYPE_AUTH: return "auth";
14 default: return "unknown";
18 const char *ceph_osd_op_name(int op)
21 case CEPH_OSD_OP_READ: return "read";
22 case CEPH_OSD_OP_STAT: return "stat";
24 case CEPH_OSD_OP_MASKTRUNC: return "masktrunc";
26 case CEPH_OSD_OP_WRITE: return "write";
27 case CEPH_OSD_OP_DELETE: return "delete";
28 case CEPH_OSD_OP_TRUNCATE: return "truncate";
29 case CEPH_OSD_OP_ZERO: return "zero";
30 case CEPH_OSD_OP_WRITEFULL: return "writefull";
31 case CEPH_OSD_OP_ROLLBACK: return "rollback";
33 case CEPH_OSD_OP_APPEND: return "append";
34 case CEPH_OSD_OP_STARTSYNC: return "startsync";
35 case CEPH_OSD_OP_SETTRUNC: return "settrunc";
36 case CEPH_OSD_OP_TRIMTRUNC: return "trimtrunc";
38 case CEPH_OSD_OP_TMAPUP: return "tmapup";
39 case CEPH_OSD_OP_TMAPGET: return "tmapget";
40 case CEPH_OSD_OP_TMAPPUT: return "tmapput";
42 case CEPH_OSD_OP_GETXATTR: return "getxattr";
43 case CEPH_OSD_OP_GETXATTRS: return "getxattrs";
44 case CEPH_OSD_OP_SETXATTR: return "setxattr";
45 case CEPH_OSD_OP_SETXATTRS: return "setxattrs";
46 case CEPH_OSD_OP_RESETXATTRS: return "resetxattrs";
47 case CEPH_OSD_OP_RMXATTR: return "rmxattr";
48 case CEPH_OSD_OP_CMPXATTR: return "cmpxattr";
50 case CEPH_OSD_OP_PULL: return "pull";
51 case CEPH_OSD_OP_PUSH: return "push";
52 case CEPH_OSD_OP_BALANCEREADS: return "balance-reads";
53 case CEPH_OSD_OP_UNBALANCEREADS: return "unbalance-reads";
54 case CEPH_OSD_OP_SCRUB: return "scrub";
56 case CEPH_OSD_OP_WRLOCK: return "wrlock";
57 case CEPH_OSD_OP_WRUNLOCK: return "wrunlock";
58 case CEPH_OSD_OP_RDLOCK: return "rdlock";
59 case CEPH_OSD_OP_RDUNLOCK: return "rdunlock";
60 case CEPH_OSD_OP_UPLOCK: return "uplock";
61 case CEPH_OSD_OP_DNLOCK: return "dnlock";
63 case CEPH_OSD_OP_CALL: return "call";
65 case CEPH_OSD_OP_PGLS: return "pgls";
70 const char *ceph_mds_state_name(int s)
74 case CEPH_MDS_STATE_DNE: return "down:dne";
75 case CEPH_MDS_STATE_STOPPED: return "down:stopped";
77 case CEPH_MDS_STATE_BOOT: return "up:boot";
78 case CEPH_MDS_STATE_STANDBY: return "up:standby";
79 case CEPH_MDS_STATE_STANDBY_REPLAY: return "up:standby-replay";
80 case CEPH_MDS_STATE_CREATING: return "up:creating";
81 case CEPH_MDS_STATE_STARTING: return "up:starting";
83 case CEPH_MDS_STATE_REPLAY: return "up:replay";
84 case CEPH_MDS_STATE_RESOLVE: return "up:resolve";
85 case CEPH_MDS_STATE_RECONNECT: return "up:reconnect";
86 case CEPH_MDS_STATE_REJOIN: return "up:rejoin";
87 case CEPH_MDS_STATE_CLIENTREPLAY: return "up:clientreplay";
88 case CEPH_MDS_STATE_ACTIVE: return "up:active";
89 case CEPH_MDS_STATE_STOPPING: return "up:stopping";
94 const char *ceph_session_op_name(int op)
97 case CEPH_SESSION_REQUEST_OPEN: return "request_open";
98 case CEPH_SESSION_OPEN: return "open";
99 case CEPH_SESSION_REQUEST_CLOSE: return "request_close";
100 case CEPH_SESSION_CLOSE: return "close";
101 case CEPH_SESSION_REQUEST_RENEWCAPS: return "request_renewcaps";
102 case CEPH_SESSION_RENEWCAPS: return "renewcaps";
103 case CEPH_SESSION_STALE: return "stale";
104 case CEPH_SESSION_RECALL_STATE: return "recall_state";
109 const char *ceph_mds_op_name(int op)
112 case CEPH_MDS_OP_LOOKUP: return "lookup";
113 case CEPH_MDS_OP_LOOKUPHASH: return "lookuphash";
114 case CEPH_MDS_OP_LOOKUPPARENT: return "lookupparent";
115 case CEPH_MDS_OP_GETATTR: return "getattr";
116 case CEPH_MDS_OP_SETXATTR: return "setxattr";
117 case CEPH_MDS_OP_SETATTR: return "setattr";
118 case CEPH_MDS_OP_RMXATTR: return "rmxattr";
119 case CEPH_MDS_OP_READDIR: return "readdir";
120 case CEPH_MDS_OP_MKNOD: return "mknod";
121 case CEPH_MDS_OP_LINK: return "link";
122 case CEPH_MDS_OP_UNLINK: return "unlink";
123 case CEPH_MDS_OP_RENAME: return "rename";
124 case CEPH_MDS_OP_MKDIR: return "mkdir";
125 case CEPH_MDS_OP_RMDIR: return "rmdir";
126 case CEPH_MDS_OP_SYMLINK: return "symlink";
127 case CEPH_MDS_OP_CREATE: return "create";
128 case CEPH_MDS_OP_OPEN: return "open";
129 case CEPH_MDS_OP_LOOKUPSNAP: return "lookupsnap";
130 case CEPH_MDS_OP_LSSNAP: return "lssnap";
131 case CEPH_MDS_OP_MKSNAP: return "mksnap";
132 case CEPH_MDS_OP_RMSNAP: return "rmsnap";
133 case CEPH_MDS_OP_SETFILELOCK: return "setfilelock";
134 case CEPH_MDS_OP_GETFILELOCK: return "getfilelock";
139 const char *ceph_cap_op_name(int op)
142 case CEPH_CAP_OP_GRANT: return "grant";
143 case CEPH_CAP_OP_REVOKE: return "revoke";
144 case CEPH_CAP_OP_TRUNC: return "trunc";
145 case CEPH_CAP_OP_EXPORT: return "export";
146 case CEPH_CAP_OP_IMPORT: return "import";
147 case CEPH_CAP_OP_UPDATE: return "update";
148 case CEPH_CAP_OP_DROP: return "drop";
149 case CEPH_CAP_OP_FLUSH: return "flush";
150 case CEPH_CAP_OP_FLUSH_ACK: return "flush_ack";
151 case CEPH_CAP_OP_FLUSHSNAP: return "flushsnap";
152 case CEPH_CAP_OP_FLUSHSNAP_ACK: return "flushsnap_ack";
153 case CEPH_CAP_OP_RELEASE: return "release";
154 case CEPH_CAP_OP_RENEW: return "renew";
159 const char *ceph_lease_op_name(int o)
162 case CEPH_MDS_LEASE_REVOKE: return "revoke";
163 case CEPH_MDS_LEASE_RELEASE: return "release";
164 case CEPH_MDS_LEASE_RENEW: return "renew";
165 case CEPH_MDS_LEASE_REVOKE_ACK: return "revoke_ack";
170 const char *ceph_snap_op_name(int o)
173 case CEPH_SNAP_OP_UPDATE: return "update";
174 case CEPH_SNAP_OP_CREATE: return "create";
175 case CEPH_SNAP_OP_DESTROY: return "destroy";
176 case CEPH_SNAP_OP_SPLIT: return "split";
181 const char *ceph_pool_op_name(int op)
184 case POOL_OP_CREATE: return "create";
185 case POOL_OP_DELETE: return "delete";
186 case POOL_OP_AUID_CHANGE: return "auid change";
187 case POOL_OP_CREATE_SNAP: return "create snap";
188 case POOL_OP_DELETE_SNAP: return "delete snap";
189 case POOL_OP_CREATE_UNMANAGED_SNAP: return "create unmanaged snap";
190 case POOL_OP_DELETE_UNMANAGED_SNAP: return "delete unmanaged snap";