summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index d06b7314d8b..60560600a02 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -10,6 +10,7 @@
#include <regex.h>
#include <signal.h>
+#include <fnmatch.h>
#include "dht-mem-types.h"
#include "dht-messages.h"
@@ -43,6 +44,13 @@
#include <fnmatch.h>
+/* Array to hold custom xattr keys
+*/
+extern char *xattrs_to_heal[];
+
+/* Rebalance nodeuuid flags */
+#define REBAL_NODEUUID_MINE 0x01
+
typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
@@ -498,10 +506,15 @@ typedef struct gf_tier_conf {
char volname[GD_VOLUME_NAME_MAX + 1];
} gf_tier_conf_t;
-typedef struct subvol_nodeuuids {
- uuid_t *uuids;
+typedef struct nodeuuid_info {
+ char info; /* Set to 1 is this is my node's uuid*/
+ uuid_t uuid; /* Store the nodeuuid as well for debugging*/
+} nodeuuid_info_t;
+
+typedef struct subvol_nodeuuids_info {
+ nodeuuid_info_t *elements;
int count;
-} subvol_nodeuuid_t;
+} subvol_nodeuuids_info_t;
struct gf_defrag_info_ {
@@ -644,7 +657,7 @@ struct dht_conf {
/*local subvol storage for rebalance*/
xlator_t **local_subvols;
- subvol_nodeuuid_t *local_nodeuuids;
+ subvol_nodeuuids_info_t *local_nodeuuids;
int32_t local_subvols_cnt;
/*