diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-05-26 11:18:05 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-18 12:09:09 +0000 |
commit | 2d278f0407ab7d29507dc697653b39d72ddee472 (patch) | |
tree | 75830c60653ca16bbd02f31f95a2c594d3a7ffc6 /xlators/mgmt | |
parent | b79222f650f6613758f036c749f5f879a54148a7 (diff) |
glusterd-volgen.c: remove BD xlator from the graph
The BD xlator was removed some time ago. Remove it from the graph.
We can also remove the caps settings - only the BD xlator
was using it.
Lastly, remove the caps (which only BD was using) and the document
describing the translator.
Change-Id: Id0adcb2952f4832a5dc6301e726874522e07935d
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 13 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.h | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 8 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 16 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 5 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 2 |
8 files changed, 1 insertions, 49 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 1c9809f0254..24416b2d5de 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -985,7 +985,6 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, 0, }; gf_boolean_t restart_needed = 0; - int caps = 0; int brickid = 0; char key[64] = ""; char *brick_mount_dir = NULL; @@ -1206,7 +1205,6 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, dict_foreach(volinfo->gsync_slaves, _glusterd_restart_gsync_session, ¶m); } - volinfo->caps = caps; generate_volfiles: if (conf->op_version <= GD_OP_VERSION_3_7_5) { diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 18bc0e83af2..576cae7b57a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -366,7 +366,6 @@ glusterd_add_volume_detail_to_dict(glusterd_volinfo_t *volinfo, dict_t *volumes, 0, }; xlator_t *this = NULL; - GF_UNUSED int caps = 0; int32_t len = 0; GF_ASSERT(volinfo); diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index afd101ce54d..708b0977900 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -941,16 +941,6 @@ glusterd_volume_exclude_options_write(int fd, glusterd_volinfo_t *volinfo) } total_len += ret; - if (volinfo->caps) { - ret = snprintf(buf + total_len, sizeof(buf) - total_len, "%s=%d\n", - GLUSTERD_STORE_KEY_VOL_CAPS, volinfo->caps); - if (ret < 0 || ret >= sizeof(buf) - total_len) { - ret = -1; - goto out; - } - total_len += ret; - } - if (conf->op_version >= GD_OP_VERSION_3_7_6) { ret = snprintf(buf + total_len, sizeof(buf) - total_len, "%s=%d\n", GLUSTERD_STORE_KEY_VOL_QUOTA_VERSION, @@ -3021,9 +3011,6 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo) } else if (!strncmp(key, GLUSTERD_STORE_KEY_VOL_CLIENT_OP_VERSION, SLEN(GLUSTERD_STORE_KEY_VOL_CLIENT_OP_VERSION))) { volinfo->client_op_version = atoi(value); - } else if (!strncmp(key, GLUSTERD_STORE_KEY_VOL_CAPS, - SLEN(GLUSTERD_STORE_KEY_VOL_CAPS))) { - volinfo->caps = atoi(value); } else if (!strncmp(key, GLUSTERD_STORE_KEY_SNAP_MAX_HARD_LIMIT, SLEN(GLUSTERD_STORE_KEY_SNAP_MAX_HARD_LIMIT))) { volinfo->snap_max_hard_limit = (uint64_t)atoll(value); diff --git a/xlators/mgmt/glusterd/src/glusterd-store.h b/xlators/mgmt/glusterd/src/glusterd-store.h index 43f971afd59..59aee880487 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.h +++ b/xlators/mgmt/glusterd/src/glusterd-store.h @@ -92,8 +92,7 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_PEER_UUID "uuid" #define GLUSTERD_STORE_KEY_PEER_HOSTNAME "hostname" #define GLUSTERD_STORE_KEY_PEER_STATE "state" - -#define GLUSTERD_STORE_KEY_VOL_CAPS "caps" +#define GLUSTERD_STORE_KEY_VOL_CAPS "caps" /* left just for backward compat */ #define GLUSTERD_STORE_KEY_VOL_DEFRAG_REB_FILES "rebalanced-files" #define GLUSTERD_STORE_KEY_VOL_DEFRAG_SIZE "size" diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 7130f074c68..4a8cadee0ab 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -3047,10 +3047,6 @@ glusterd_add_volume_to_dict(glusterd_volinfo_t *volinfo, dict_t *dict, if (ret) goto out; - /*Add volume Capability (BD Xlator) to dict*/ - keylen = snprintf(key, sizeof(key), "%s.caps", pfx); - ret = dict_set_int32n(dict, key, keylen, volinfo->caps); - keylen = snprintf(key, sizeof(key), "%s.quota-xattr-version", pfx); ret = dict_set_int32n(dict, key, keylen, volinfo->quota_xattr_version); out: @@ -4309,10 +4305,6 @@ glusterd_import_volinfo(dict_t *peer_data, int count, new_volinfo->client_op_version = 1; } - keylen = snprintf(key, sizeof(key), "%s.caps", key_prefix); - /*This is not present in older glusterfs versions, so ignore ret value*/ - ret = dict_get_int32n(peer_data, key, keylen, &new_volinfo->caps); - keylen = snprintf(key, sizeof(key), "%s.quota-xattr-version", key_prefix); /*This is not present in older glusterfs versions, so ignore ret value*/ ret = dict_get_int32n(peer_data, key, keylen, diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 794b1887847..69312c44227 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1779,21 +1779,6 @@ out: } static int -brick_graph_add_bd(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, - dict_t *set_dict, glusterd_brickinfo_t *brickinfo) -{ - int ret = -1; - - if (!graph || !volinfo || !set_dict || !brickinfo) - goto out; - - ret = 0; - -out: - return ret; -} - -static int brick_graph_add_bitrot_stub(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, dict_t *set_dict, glusterd_brickinfo_t *brickinfo) { @@ -2623,7 +2608,6 @@ static volgen_brick_xlator_t server_graph_table[] = { {brick_graph_add_acl, "acl"}, {brick_graph_add_bitrot_stub, "bitrot-stub"}, {brick_graph_add_changelog, "changelog"}, - {brick_graph_add_bd, "bd"}, {brick_graph_add_trash, "trash"}, {brick_graph_add_arbiter, "arbiter"}, {brick_graph_add_posix, "posix"}, diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index 991063ee487..7eb74d7b4fd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -1382,7 +1382,6 @@ glusterd_op_stage_start_volume(dict_t *dict, char **op_errstr, dict_t *rsp_dict) char xattr_volid[50] = { 0, }; - int caps = 0; int32_t len = 0; this = THIS; @@ -1547,7 +1546,6 @@ glusterd_op_stage_start_volume(dict_t *dict, char **op_errstr, dict_t *rsp_dict) goto out; } - volinfo->caps = caps; ret = 0; out: if (volinfo) @@ -2042,7 +2040,6 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr) char *str = NULL; char *username = NULL; char *password = NULL; - int caps = 0; int brickid = 0; char msg[1024] __attribute__((unused)) = { 0, @@ -2331,8 +2328,6 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr) gd_update_volume_op_versions(volinfo); - volinfo->caps = caps; - ret = glusterd_store_volinfo(volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT); if (ret) { glusterd_store_delete_volume(volinfo); diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 7db7896256c..cf8d0395aa5 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -278,7 +278,6 @@ struct glusterd_brickinfo { struct rpc_clnt *rpc; int decommissioned; char vg[PATH_MAX]; /* FIXME: Use max size for length of vg */ - int caps; /* Capability */ int32_t snap_status; /* * The group is used to identify which bricks are part of the same @@ -489,7 +488,6 @@ struct glusterd_volinfo_ { xlator_t *xl; gf_boolean_t memory_accounting; - int caps; /* Capability */ int op_version; int client_op_version; |