summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/glusterfs.h')
-rw-r--r--libglusterfs/src/glusterfs.h52
1 files changed, 35 insertions, 17 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 763968c9e..2f1e12ee7 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -70,6 +70,7 @@
#define FNM_EXTMATCH 0
#endif
+#define GLUSTERD_MAX_SNAP_NAME 256
#define ZR_MOUNTPOINT_OPT "mountpoint"
#define ZR_ATTR_TIMEOUT_OPT "attribute-timeout"
#define ZR_ENTRY_TIMEOUT_OPT "entry-timeout"
@@ -88,6 +89,8 @@
#define GF_READDIR_SKIP_DIRS "readdir-filter-directories"
+#define BD_XATTR_KEY "user.glusterfs"
+
#define XATTR_IS_PATHINFO(x) (strncmp (x, GF_XATTR_PATHINFO_KEY, \
strlen (GF_XATTR_PATHINFO_KEY)) == 0)
#define XATTR_IS_NODE_UUID(x) (strncmp (x, GF_XATTR_NODE_UUID_KEY, \
@@ -95,6 +98,8 @@
#define XATTR_IS_LOCKINFO(x) (strncmp (x, GF_XATTR_LOCKINFO_KEY, \
strlen (GF_XATTR_LOCKINFO_KEY)) == 0)
+#define XATTR_IS_BD(x) (strncmp (x, BD_XATTR_KEY, strlen (BD_XATTR_KEY)) == 0)
+
#define GF_XATTR_LINKINFO_KEY "trusted.distribute.linkinfo"
#define GFID_XATTR_KEY "trusted.gfid"
#define VIRTUAL_GFID_XATTR_KEY_STR "glusterfs.gfid.string"
@@ -102,11 +107,11 @@
#define UUID_CANONICAL_FORM_LEN 36
#define GLUSTERFS_INTERNAL_FOP_KEY "glusterfs-internal-fop"
-#define GLUSTERFS_CREATE_MODE_KEY "glusterfs-create-mode"
#define ZR_FILE_CONTENT_STR "glusterfs.file."
#define ZR_FILE_CONTENT_STRLEN 15
+#define GLUSTERFS_WRITE_IS_APPEND "glusterfs.write-is-append"
#define GLUSTERFS_OPEN_FD_COUNT "glusterfs.open-fd-count"
#define GLUSTERFS_INODELK_COUNT "glusterfs.inodelk-count"
#define GLUSTERFS_ENTRYLK_COUNT "glusterfs.entrylk-count"
@@ -119,6 +124,7 @@
/* Index xlator related */
#define GF_XATTROP_INDEX_GFID "glusterfs.xattrop_index_gfid"
+#define GF_BASE_INDICES_HOLDER_GFID "glusterfs.base_indicies_holder_gfid"
#define GF_GFIDLESS_LOOKUP "gfidless-lookup"
/* replace-brick and pump related internal xattrs */
@@ -128,9 +134,6 @@
#define RB_PUMP_CMD_ABORT "glusterfs.pump.abort"
#define RB_PUMP_CMD_STATUS "glusterfs.pump.status"
-#define POSIX_ACL_DEFAULT_XATTR "system.posix_acl_default"
-#define POSIX_ACL_ACCESS_XATTR "system.posix_acl_access"
-
#define GLUSTERFS_RDMA_INLINE_THRESHOLD (2048)
#define GLUSTERFS_RDMA_MAX_HEADER_SIZE (228) /* (sizeof (rdma_header_t) \
+ RDMA_MAX_SEGMENTS \
@@ -159,6 +162,11 @@
#define UUID_CANONICAL_FORM_LEN 36
+/* Adding this here instead of any glusterd*.h files as it is also required by
+ * cli
+ */
+#define DEFAULT_GLUSTERD_SOCKFILE DATADIR "/run/glusterd.socket"
+
/* NOTE: add members ONLY at the end (just before _MAXVALUE) */
typedef enum {
GF_FOP_NULL = 0,
@@ -209,6 +217,7 @@ typedef enum {
GF_FOP_FREMOVEXATTR,
GF_FOP_FALLOCATE,
GF_FOP_DISCARD,
+ GF_FOP_ZEROFILL,
GF_FOP_MAXVALUE,
} glusterfs_fop_t;
@@ -294,6 +303,11 @@ struct _xlator_cmdline_option {
};
typedef struct _xlator_cmdline_option xlator_cmdline_option_t;
+struct _server_cmdline {
+ struct list_head list;
+ char *volfile_server;
+};
+typedef struct _server_cmdline server_cmdline_t;
#define GF_OPTION_ENABLE _gf_true
#define GF_OPTION_DISABLE _gf_false
@@ -301,9 +315,12 @@ typedef struct _xlator_cmdline_option xlator_cmdline_option_t;
struct _cmd_args {
/* basic options */
- char *volfile_server;
- char *volfile;
- char *log_server;
+ char *volfile_server;
+ server_cmdline_t *curr_server;
+ /* List of backup volfile servers, including original */
+ struct list_head volfile_servers;
+ char *volfile;
+ char *log_server;
gf_loglevel_t log_level;
char *log_file;
int32_t max_connect_attempts;
@@ -322,14 +339,14 @@ struct _cmd_args {
int enable_ino32;
int worm;
int mac_compat;
- int fopen_keep_cache;
- int gid_timeout;
+ int fopen_keep_cache;
+ int gid_timeout;
int aux_gfid_mount;
- struct list_head xlator_options; /* list of xlator_option_t */
+ struct list_head xlator_options; /* list of xlator_option_t */
- /* fuse options */
- int fuse_direct_io_mode;
- char *use_readdirp;
+ /* fuse options */
+ int fuse_direct_io_mode;
+ char *use_readdirp;
int volfile_check;
double fuse_entry_timeout;
double fuse_negative_timeout;
@@ -343,7 +360,7 @@ struct _cmd_args {
unsigned uid_map_root;
int background_qlen;
int congestion_threshold;
- char *fuse_mountopts;
+ char *fuse_mountopts;
/* key args */
char *mount_point;
@@ -353,7 +370,6 @@ struct _cmd_args {
int brick_port;
char *brick_name;
int brick_port2;
-
};
typedef struct _cmd_args cmd_args_t;
@@ -382,7 +398,7 @@ struct _glusterfs_ctx {
char fin;
void *timer;
void *ib;
- void *pool;
+ struct call_pool *pool;
void *event_pool;
void *iobuf_pool;
pthread_mutex_t lock;
@@ -420,7 +436,8 @@ struct _glusterfs_ctx {
int daemon_pipe[2];
- struct _clienttable *clienttable;
+ struct client_disconnect *client_disconnect;
+ struct clienttable *clienttable;
};
typedef struct _glusterfs_ctx glusterfs_ctx_t;
@@ -444,6 +461,7 @@ typedef enum {
GF_EVENT_AUTH_FAILED,
GF_EVENT_VOLUME_DEFRAG,
GF_EVENT_PARENT_DOWN,
+ GF_EVENT_VOLUME_BARRIER_OP,
GF_EVENT_MAXVAL,
} glusterfs_event_t;