linux/net/ceph/ceph_strings.c
<<
>>
Prefs
   1/*
   2 * Ceph string constants
   3 */
   4#include <linux/module.h>
   5#include <linux/ceph/types.h>
   6
   7const char *ceph_entity_type_name(int type)
   8{
   9        switch (type) {
  10        case CEPH_ENTITY_TYPE_MDS: return "mds";
  11        case CEPH_ENTITY_TYPE_OSD: return "osd";
  12        case CEPH_ENTITY_TYPE_MON: return "mon";
  13        case CEPH_ENTITY_TYPE_CLIENT: return "client";
  14        case CEPH_ENTITY_TYPE_AUTH: return "auth";
  15        default: return "unknown";
  16        }
  17}
  18
  19const char *ceph_osd_op_name(int op)
  20{
  21        switch (op) {
  22        case CEPH_OSD_OP_READ: return "read";
  23        case CEPH_OSD_OP_STAT: return "stat";
  24
  25        case CEPH_OSD_OP_MASKTRUNC: return "masktrunc";
  26
  27        case CEPH_OSD_OP_WRITE: return "write";
  28        case CEPH_OSD_OP_DELETE: return "delete";
  29        case CEPH_OSD_OP_TRUNCATE: return "truncate";
  30        case CEPH_OSD_OP_ZERO: return "zero";
  31        case CEPH_OSD_OP_WRITEFULL: return "writefull";
  32        case CEPH_OSD_OP_ROLLBACK: return "rollback";
  33
  34        case CEPH_OSD_OP_APPEND: return "append";
  35        case CEPH_OSD_OP_STARTSYNC: return "startsync";
  36        case CEPH_OSD_OP_SETTRUNC: return "settrunc";
  37        case CEPH_OSD_OP_TRIMTRUNC: return "trimtrunc";
  38
  39        case CEPH_OSD_OP_TMAPUP: return "tmapup";
  40        case CEPH_OSD_OP_TMAPGET: return "tmapget";
  41        case CEPH_OSD_OP_TMAPPUT: return "tmapput";
  42
  43        case CEPH_OSD_OP_GETXATTR: return "getxattr";
  44        case CEPH_OSD_OP_GETXATTRS: return "getxattrs";
  45        case CEPH_OSD_OP_SETXATTR: return "setxattr";
  46        case CEPH_OSD_OP_SETXATTRS: return "setxattrs";
  47        case CEPH_OSD_OP_RESETXATTRS: return "resetxattrs";
  48        case CEPH_OSD_OP_RMXATTR: return "rmxattr";
  49        case CEPH_OSD_OP_CMPXATTR: return "cmpxattr";
  50
  51        case CEPH_OSD_OP_PULL: return "pull";
  52        case CEPH_OSD_OP_PUSH: return "push";
  53        case CEPH_OSD_OP_BALANCEREADS: return "balance-reads";
  54        case CEPH_OSD_OP_UNBALANCEREADS: return "unbalance-reads";
  55        case CEPH_OSD_OP_SCRUB: return "scrub";
  56
  57        case CEPH_OSD_OP_WRLOCK: return "wrlock";
  58        case CEPH_OSD_OP_WRUNLOCK: return "wrunlock";
  59        case CEPH_OSD_OP_RDLOCK: return "rdlock";
  60        case CEPH_OSD_OP_RDUNLOCK: return "rdunlock";
  61        case CEPH_OSD_OP_UPLOCK: return "uplock";
  62        case CEPH_OSD_OP_DNLOCK: return "dnlock";
  63
  64        case CEPH_OSD_OP_CALL: return "call";
  65
  66        case CEPH_OSD_OP_PGLS: return "pgls";
  67        }
  68        return "???";
  69}
  70
  71
  72const char *ceph_pool_op_name(int op)
  73{
  74        switch (op) {
  75        case POOL_OP_CREATE: return "create";
  76        case POOL_OP_DELETE: return "delete";
  77        case POOL_OP_AUID_CHANGE: return "auid change";
  78        case POOL_OP_CREATE_SNAP: return "create snap";
  79        case POOL_OP_DELETE_SNAP: return "delete snap";
  80        case POOL_OP_CREATE_UNMANAGED_SNAP: return "create unmanaged snap";
  81        case POOL_OP_DELETE_UNMANAGED_SNAP: return "delete unmanaged snap";
  82        }
  83        return "???";
  84}
  85
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.