diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 9b6e2fb33..e704de44b 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -38,6 +38,7 @@ #include "cli1-xdr.h" #include "syncop.h" #include "store.h" +#include "glusterd-etcd.h" #define GLUSTERD_MAX_VOLUME_NAME 1000 #define GLUSTERD_TR_LOG_SIZE 50 @@ -157,6 +158,7 @@ typedef struct { gf_boolean_t restart_done; rpcsvc_t *uds_rpc; /* RPCSVC for the unix domain socket */ uint32_t base_port; + pid_t etcd_pid; } glusterd_conf_t; @@ -180,6 +182,15 @@ struct glusterd_brickinfo { int decommissioned; char vg[PATH_MAX]; /* FIXME: Use max size for length of vg */ int caps; /* Capability */ + /* + * The group is used to identify which bricks are part of the same + * replica set during brick-volfile generation, so that NSR volfiles + * can "cross-connect" the bricks to one another. This same approach + * could be used to make client-volfile generation much simpler and + * more efficient too, though it would require some further adaptation + * to support more than one layer of hierarchy. + */ + uint16_t group; }; typedef struct glusterd_brickinfo glusterd_brickinfo_t; @@ -418,6 +429,15 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); volpath, brickinfo->hostname, exp_path); \ } while (0) +#define GLUSTERD_GET_BRICK_RECON_PIDFILE(pidfile,volinfo,brickinfo, priv) do { \ + char exp_path[PATH_MAX] = {0,}; \ + char volpath[PATH_MAX] = {0,}; \ + GLUSTERD_GET_VOLUME_DIR (volpath, volinfo, priv); \ + GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, exp_path); \ + snprintf (pidfile, PATH_MAX, "%s/run/%s:-%s-recon.pid", \ + volpath, brickinfo->hostname, exp_path); \ + } while (0) + #define GLUSTERD_GET_NFS_PIDFILE(pidfile,nfspath) { \ snprintf (pidfile, PATH_MAX, "%s/run/nfs.pid", \ nfspath); \ |