diff options
Diffstat (limited to 'libglusterfs/src/glusterfs.h')
| -rw-r--r-- | libglusterfs/src/glusterfs.h | 37 | 
1 files changed, 37 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 438ce059fad..d702a5fa9ba 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -85,6 +85,7 @@  #define ZR_STRICT_VOLFILE_CHECK "strict-volfile-check"  #define ZR_DUMP_FUSE            "dump-fuse"  #define ZR_FUSE_MOUNTOPTS       "fuse-mountopts" +#define IO_THREADS_QUEUE_SIZE_KEY "io-thread-queue-size"  #define GF_XATTR_CLRLK_CMD      "glusterfs.clrlk"  #define GF_XATTR_PATHINFO_KEY   "trusted.glusterfs.pathinfo" @@ -308,6 +309,42 @@  #define GF_LK_MANDATORY 1 /* maps to GLFS_LK_MANDATORY from libgfapi*/  #define GF_LOCK_MODE "glusterfs.lk.lkmode" +#define GF_CHECK_XATTR_KEY_AND_GOTO(key, cmpkey, errval, lbl)   \ +        do {                                                    \ +                if (key && strcmp (key, cmpkey) == 0) {         \ +                        errval = -EINVAL;                       \ +                        goto lbl;                               \ +                }                                               \ +        } while (0)                                             \ + + +typedef enum { +        GF_FOP_PRI_UNSPEC = -1,         /* Priority not specified */ +        GF_FOP_PRI_HI = 0,              /* low latency */ +        GF_FOP_PRI_NORMAL,              /* normal */ +        GF_FOP_PRI_LO,                  /* bulk */ +        GF_FOP_PRI_LEAST,               /* least */ +        GF_FOP_PRI_MAX,                 /* Highest */ +} gf_fop_pri_t; + +static const char * const FOP_PRI_STRINGS[] = { +        "HIGH", +        "NORMAL", +        "LOW", +        "LEAST" +}; + +static inline const char *fop_pri_to_string (gf_fop_pri_t pri) +{ +        if (pri < 0) +                return "UNSPEC"; + +        if (pri >= GF_FOP_PRI_MAX) +                return "INVALID"; + +        return FOP_PRI_STRINGS[pri]; +} +  const char *fop_enum_to_pri_string (glusterfs_fop_t fop);  #define GF_SET_IF_NOT_PRESENT 0x1 /* default behaviour */  | 
