summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/tier.h
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2016-01-26 17:47:08 +0530
committerDan Lambright <dlambrig@redhat.com>2016-02-03 10:04:40 -0800
commit11202e6c726f79ddf0e461338d7dce158733122e (patch)
treedf1381c8783ba8f5507f8311db4b9febf9536d10 /xlators/cluster/dht/src/tier.h
parent545f4ed2c7195a21210e6a055c27c1b7a115e18c (diff)
tier/gfdb : Round-Robin read of query files
1. Each brick on a host will get a separate query file. 2. While reading query record from these query files we read them in a Round-Robin manner. 3. When an error occurs during migration we rename it to query file with an time stamp and .err extension for better debugging. Change-Id: I27c4285d24fd695d2d5cbd9fd7db3879d277ecc8 BUG: 1302772 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/13293 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/dht/src/tier.h')
-rw-r--r--xlators/cluster/dht/src/tier.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h
index 92e2fda6e5c..41c5a318de4 100644
--- a/xlators/cluster/dht/src/tier.h
+++ b/xlators/cluster/dht/src/tier.h
@@ -39,25 +39,39 @@
#define GET_QFILE_PATH(is_promotion)\
(is_promotion) ? promotion_qfile : demotion_qfile
+typedef struct tier_qfile_array {
+ int *fd_array;
+ ssize_t array_size;
+ ssize_t next_index;
+ /* Indicate the number of exhuasted FDs*/
+ ssize_t exhausted_count;
+} tier_qfile_array_t;
+
+
typedef struct _query_cbk_args {
- xlator_t *this;
- gf_defrag_info_t *defrag;
- int query_fd;
- int is_promotion;
+ xlator_t *this;
+ gf_defrag_info_t *defrag;
+ /* This is write */
+ int query_fd;
+ int is_promotion;
+ /* This is for read */
+ tier_qfile_array_t *qfile_array;
} query_cbk_args_t;
int
gf_run_tier(xlator_t *this, gf_defrag_info_t *defrag);
typedef struct gfdb_brick_info {
- gfdb_time_t *time_stamp;
+ gfdb_time_t *time_stamp;
gf_boolean_t _gfdb_promote;
- query_cbk_args_t *_query_cbk_args;
+ query_cbk_args_t *_query_cbk_args;
} gfdb_brick_info_t;
typedef struct brick_list {
xlator_t *xlator;
char *brick_db_path;
+ char brick_name[NAME_MAX];
+ char qfile_path[PATH_MAX];
struct list_head list;
} tier_brick_list_t;