diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 3dd2729573d..8b489cca426 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -567,16 +567,15 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words, char *bricks = NULL; char *ta_brick = NULL; int32_t brick_count = 0; - static char *opwords[] = {"replica", "stripe", "transport", - "disperse", "redundancy", "disperse-data", - "arbiter", "thin-arbiter", NULL}; + static char *opwords[] = { + "replica", "transport", "disperse", "redundancy", + "disperse-data", "arbiter", "thin-arbiter", NULL}; char *w = NULL; int op_count = 0; int32_t replica_count = 1; int32_t arbiter_count = 0; int32_t thin_arbiter_count = 0; - int32_t stripe_count = 1; int32_t disperse_count = -1; int32_t redundancy_count = -1; int32_t disperse_data_count = -1; @@ -619,16 +618,12 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words, break; } else if ((strcmp(w, "replica")) == 0) { switch (type) { - case GF_CLUSTER_TYPE_STRIPE_REPLICATE: case GF_CLUSTER_TYPE_REPLICATE: cli_err("replica option given twice"); goto out; case GF_CLUSTER_TYPE_NONE: type = GF_CLUSTER_TYPE_REPLICATE; break; - case GF_CLUSTER_TYPE_STRIPE: - cli_err("stripe option not supported"); - goto out; case GF_CLUSTER_TYPE_DISPERSE: cli_err( "replicated-dispersed volume is not " @@ -726,9 +721,6 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words, if (ret) goto out; - } else if ((strcmp(w, "stripe")) == 0) { - cli_err("stripe option not supported"); - goto out; } else if ((strcmp(w, "transport")) == 0) { if (trans_type) { cli_err( @@ -826,15 +818,9 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words, goto out; sub_count = disperse_count; - } else - sub_count = stripe_count * replica_count; - + } if (brick_count % sub_count) { - if (type == GF_CLUSTER_TYPE_STRIPE) - cli_err( - "number of bricks is not a multiple of " - "stripe count"); - else if (type == GF_CLUSTER_TYPE_REPLICATE) + if (type == GF_CLUSTER_TYPE_REPLICATE) cli_err( "number of bricks is not a multiple of " "replica count"); @@ -1852,7 +1838,7 @@ cli_cmd_volume_add_brick_parse(struct cli_state *state, const char **words, int ret = -1; int brick_count = 0, brick_index = 0; char *bricks = NULL; - static char *opwords_cl[] = {"replica", "stripe", NULL}; + static char *opwords_cl[] = {"replica", NULL}; gf1_cluster_type type = GF_CLUSTER_TYPE_NONE; int count = 1; int arbiter_count = 0; @@ -1946,9 +1932,6 @@ cli_cmd_volume_add_brick_parse(struct cli_state *state, const char **words, } } } - } else if ((strcmp(w, "stripe")) == 0) { - cli_err("stripe option not supported"); - goto out; } else { GF_ASSERT(!"opword mismatch"); ret = -1; diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index b4c32d72f5e..3f2bfdb7999 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1038,7 +1038,6 @@ cli_cmd_volume_add_brick_cbk(struct cli_state *state, struct cli_cmd_word *word, dict_t *options = NULL; int sent = 0; int parse_error = 0; - gf_answer_t answer = GF_ANSWER_NO; cli_local_t *local = NULL; #if (USE_EVENTS) @@ -1047,13 +1046,6 @@ cli_cmd_volume_add_brick_cbk(struct cli_state *state, struct cli_cmd_word *word, const char *eventstrformat = "volume=%s;bricks=%s"; #endif - const char *question = - "Changing the 'stripe count' of the volume is " - "not a supported feature. In some cases it may result in data " - "loss on the volume. Also there may be issues with regular " - "filesystem operations on the volume after the change. Do you " - "really want to continue with 'stripe' count option ? "; - ret = cli_cmd_volume_add_brick_parse(state, words, wordcount, &options, 0); if (ret) { cli_usage_out(word->pattern); @@ -1061,17 +1053,6 @@ cli_cmd_volume_add_brick_cbk(struct cli_state *state, struct cli_cmd_word *word, goto out; } - /* TODO: there are challenges in supporting changing of - stripe-count, until it is properly supported give warning to user */ - if (dict_get(options, "stripe-count")) { - answer = cli_cmd_get_confirmation(state, question); - - if (GF_ANSWER_NO == answer) { - ret = 0; - goto out; - } - } - #if (USE_EVENTS) /* Get the list of bricks for the event */ @@ -3039,7 +3020,7 @@ struct cli_cmd volume_cmds[] = { {"volume info [all|]", cli_cmd_volume_info_cbk, "list information of all volumes"}, - {"volume create [stripe ] " + {"volume create " "[[replica [arbiter ]]|[replica 2 thin-arbiter 1]] " "[disperse []] [disperse-data ] [redundancy ] " "[transport ] " @@ -3061,7 +3042,7 @@ struct cli_cmd volume_cmds[] = { cli_cmd_volume_rename_cbk, "rename volume to "},*/ - {"volume add-brick [ " + {"volume add-brick [ " "[arbiter ]] ... [force]", cli_cmd_volume_add_brick_cbk, "add brick to volume "}, diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index b2a0212de86..269d15db3f9 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -677,9 +677,8 @@ print_brick_details(dict_t *dict, int volcount, int start_index, int end_index, static void gf_cli_print_number_of_bricks(int type, int brick_count, int dist_count, - int stripe_count, int replica_count, - int disperse_count, int redundancy_count, - int arbiter_count) + int replica_count, int disperse_count, + int redundancy_count, int arbiter_count) { if (type == GF_CLUSTER_TYPE_NONE) { cli_out("Number of Bricks: %d", brick_count); @@ -688,8 +687,7 @@ gf_cli_print_number_of_bricks(int type, int brick_count, int dist_count, (brick_count / dist_count), disperse_count - redundancy_count, redundancy_count, brick_count); } else { - /* For both replicate and stripe, dist_count is - good enough */ + /* For replicate, dist_count is good enough */ if (arbiter_count == 0) { cli_out("Number of Bricks: %d x %d = %d", (brick_count / dist_count), dist_count, brick_count); @@ -713,7 +711,6 @@ gf_cli_get_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, int32_t type = 0; int32_t brick_count = 0; int32_t dist_count = 0; - int32_t stripe_count = 0; int32_t replica_count = 0; int32_t disperse_count = 0; int32_t redundancy_count = 0; @@ -861,16 +858,6 @@ gf_cli_get_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, if (ret) goto out; - keylen = snprintf(key, sizeof(key), "volume%d.stripe_count", i); - ret = dict_get_int32n(dict, key, keylen, &stripe_count); - if (ret) - goto out; - - keylen = snprintf(key, sizeof(key), "volume%d.replica_count", i); - ret = dict_get_int32n(dict, key, keylen, &replica_count); - if (ret) - goto out; - keylen = snprintf(key, sizeof(key), "volume%d.disperse_count", i); ret = dict_get_int32n(dict, key, keylen, &disperse_count); if (ret) @@ -906,7 +893,7 @@ gf_cli_get_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, if (ret) goto out; - // Distributed (stripe/replicate/stripe-replica) setups + // Distributed (replicate) setups vol_type = get_vol_type(type, dist_count, brick_count); cli_out("Volume Name: %s", volname); @@ -915,9 +902,9 @@ gf_cli_get_volume_cbk(struct rpc_req *req, struct iovec *iov, int count, cli_out("Status: %s", cli_vol_status_str[status]); cli_out("Snapshot Count: %d", snap_count); - gf_cli_print_number_of_bricks( - type, brick_count, dist_count, stripe_count, replica_count, - disperse_count, redundancy_count, arbiter_count); + gf_cli_print_number_of_bricks(type, brick_count, dist_count, + replica_count, disperse_count, + redundancy_count, arbiter_count); cli_out("Transport-type: %s", ((transport == 0) ? "tcp" diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index b9d5365362e..3440bffc51b 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -2429,7 +2429,6 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict) int status = 0; int brick_count = 0; int dist_count = 0; - int stripe_count = 0; int replica_count = 0; int arbiter_count = 0; int snap_count = 0; @@ -2509,14 +2508,6 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict) (brick_count / dist_count)); XML_RET_CHECK_AND_GOTO(ret, out); - snprintf(key, sizeof(key), "volume%d.stripe_count", i); - ret = dict_get_int32(dict, key, &stripe_count); - if (ret) - goto out; - ret = xmlTextWriterWriteFormatElement( - local->writer, (xmlChar *)"stripeCount", "%d", stripe_count); - XML_RET_CHECK_AND_GOTO(ret, out); - snprintf(key, sizeof(key), "volume%d.replica_count", i); ret = dict_get_int32(dict, key, &replica_count); if (ret) @@ -2554,7 +2545,7 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict) ret = dict_get_int32(dict, key, &type); if (ret) goto out; - /* For Distributed-(stripe,replicate,stipe-replicate,disperse) + /* For Distributed-(replicate,disperse) types */ type = get_vol_type(type, dist_count, brick_count); diff --git a/tests/bugs/stripe/bug-1002207.t b/tests/bugs/stripe/bug-1002207.t deleted file mode 100644 index c58a6e20ab8..00000000000 --- a/tests/bugs/stripe/bug-1002207.t +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup; - -## Start and create a volume -TEST glusterd; -TEST pidof glusterd; -TEST $CLI volume create $V0 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8}; - -## Verify volume is is created -EXPECT "$V0" volinfo_field $V0 'Volume Name'; -EXPECT 'Created' volinfo_field $V0 'Status'; - -## Start volume and verify -TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; - -TEST glusterfs --attribute-timeout=0 --entry-timeout=0 -s $H0 --volfile-id=$V0 $M0; -TEST dd if=/dev/zero of=$M0/file$i.data bs=1024 count=1024; - -function xattr_query_check() -{ - local path=$1 - local xa_name=$2 - - local ret=$(getfattr -n $xa_name $path 2>&1 | grep -o "$xa_name: No such attribute" | wc -l) - echo $ret -} - -function set_xattr() -{ - local path=$1 - local xa_name=$2 - local xa_val=$3 - - setfattr -n $xa_name -v $xa_val $path - echo $? -} - -EXPECT 0 set_xattr $M0/file$i.data "trusted.name" "testofafairlylongxattrstringthatbutnotlongenoughtofailmemoryallocation" -EXPECT 0 xattr_query_check $M0/file$i.data "trusted.name" - -## Finish up -TEST $CLI volume stop $V0; -EXPECT 'Stopped' volinfo_field $V0 'Status'; - -TEST $CLI volume delete $V0; -TEST ! $CLI volume info $V0; - -cleanup; -#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/tests/bugs/stripe/bug-1111454.t b/tests/bugs/stripe/bug-1111454.t deleted file mode 100644 index 1509dd7b1a2..00000000000 --- a/tests/bugs/stripe/bug-1111454.t +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -#symlink resolution should succeed -cleanup; - -TEST glusterd -TEST pidof glusterd -TEST $CLI volume create $V0 stripe 2 $H0:$B0/${V0}{0,1} -TEST $CLI volume start $V0 -TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 -TEST mkdir $M0/dir -TEST touch $M0/dir/file -TEST ln -s file $M0/dir/symlinkfile -TEST ls -lR $M0 -cleanup -#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 -#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000 diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 6f1b1f3ff63..d3cf76d0c90 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -33,7 +33,7 @@ int add_brick_at_right_order(glusterd_brickinfo_t *brickinfo, glusterd_volinfo_t *volinfo, int count, - int32_t stripe_cnt, int32_t replica_cnt) + int32_t replica_cnt) { int idx = 0; int i = 0; @@ -44,21 +44,6 @@ add_brick_at_right_order(glusterd_brickinfo_t *brickinfo, to add new brick. Even though it can be defined with a complex single formula for all volume, it is separated out to make it more readable */ - if (stripe_cnt) { - /* common formula when 'stripe_count' is set */ - /* idx = ((count / ((stripe_cnt * volinfo->replica_count) - - volinfo->dist_leaf_count)) * volinfo->dist_leaf_count) + - (count + volinfo->dist_leaf_count); - */ - - sub_cnt = volinfo->dist_leaf_count; - - idx = ((count / ((stripe_cnt * volinfo->replica_count) - sub_cnt)) * - sub_cnt) + - (count + sub_cnt); - - goto insert_brick; - } /* replica count is set */ /* common formula when 'replica_count' is set */ @@ -70,7 +55,6 @@ add_brick_at_right_order(glusterd_brickinfo_t *brickinfo, sub_cnt = volinfo->replica_count; idx = (count / (replica_cnt - sub_cnt) * sub_cnt) + (count + sub_cnt); -insert_brick: i = 0; cds_list_for_each_entry(brick, &volinfo->bricks, brick_list) { @@ -147,8 +131,7 @@ gd_addbr_validate_replica_count(glusterd_volinfo_t *volinfo, int replica_count, the number or subvolumes for distribute will remain same, when replica count is given */ if ((total_bricks * volinfo->dist_leaf_count) == - (volinfo->brick_count * - (replica_count * volinfo->stripe_count))) { + (volinfo->brick_count * replica_count)) { /* Change the dist_leaf_count */ gf_msg(THIS->name, GF_LOG_INFO, 0, GD_MSG_REPLICA_COUNT_CHANGE_INFO, @@ -270,7 +253,6 @@ __glusterd_handle_add_brick(rpcsvc_request_t *req) int total_bricks = 0; int32_t replica_count = 0; int32_t arbiter_count = 0; - int32_t stripe_count = 0; int type = 0; glusterd_conf_t *conf = NULL; @@ -358,13 +340,6 @@ __glusterd_handle_add_brick(rpcsvc_request_t *req) "arbiter-count is %d", arbiter_count); } - ret = dict_get_int32n(dict, "stripe-count", SLEN("stripe-count"), - &stripe_count); - if (!ret) { - gf_msg(this->name, GF_LOG_INFO, errno, GD_MSG_DICT_GET_SUCCESS, - "stripe-count is %d", stripe_count); - } - if (!dict_getn(dict, "force", SLEN("force"))) { gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_GET_FAILED, "Failed to get flag"); @@ -373,7 +348,7 @@ __glusterd_handle_add_brick(rpcsvc_request_t *req) total_bricks = volinfo->brick_count + brick_count; - if (!stripe_count && !replica_count) { + if (!replica_count) { if (volinfo->type == GF_CLUSTER_TYPE_NONE) goto brick_val; @@ -392,7 +367,7 @@ __glusterd_handle_add_brick(rpcsvc_request_t *req) goto out; } goto brick_val; - /* done with validation.. below section is if stripe|replica + /* done with validation.. below section is if replica count is given */ } @@ -779,7 +754,7 @@ __glusterd_handle_remove_brick(rpcsvc_request_t *req) } /* Do not allow remove-brick if the bricks given is less than - the replica count or stripe count */ + the replica count */ if (!replica_count && (volinfo->type != GF_CLUSTER_TYPE_NONE)) { if (volinfo->dist_leaf_count && (count % volinfo->dist_leaf_count)) { snprintf(err_str, sizeof(err_str), @@ -1009,7 +984,6 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, char *free_ptr2 = NULL; char *saveptr = NULL; int32_t ret = -1; - int32_t stripe_count = 0; int32_t replica_count = 0; int32_t arbiter_count = 0; int32_t type = 0; @@ -1045,12 +1019,6 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, brick = strtok_r(brick_list + 1, " \n", &saveptr); if (dict) { - ret = dict_get_int32n(dict, "stripe-count", SLEN("stripe-count"), - &stripe_count); - if (!ret) - gf_msg(THIS->name, GF_LOG_INFO, errno, GD_MSG_DICT_GET_SUCCESS, - "stripe-count is set %d", stripe_count); - ret = dict_get_int32n(dict, "replica-count", SLEN("replica-count"), &replica_count); if (!ret) @@ -1112,8 +1080,8 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, } brickinfo->statfs_fsid = brickstat.f_fsid; } - if (stripe_count || replica_count) { - add_brick_at_right_order(brickinfo, volinfo, (i - 1), stripe_count, + if (replica_count) { + add_brick_at_right_order(brickinfo, volinfo, (i - 1), replica_count); } else { cds_list_add_tail(&brickinfo->brick_list, &volinfo->bricks); @@ -1151,9 +1119,6 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count, if (arbiter_count) { volinfo->arbiter_count = arbiter_count; } - if (stripe_count) { - volinfo->stripe_count = stripe_count; - } volinfo->dist_leaf_count = glusterd_get_dist_leaf_count(volinfo); /* backward compatibility */ diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 545e3b72650..43b95ecbc61 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -431,14 +431,6 @@ glusterd_add_volume_detail_to_dict(glusterd_volinfo_t *volinfo, dict_t *volumes, goto out; } - keylen = snprintf(key, sizeof(key), "volume%d.stripe_count", count); - ret = dict_set_int32n(volumes, key, keylen, volinfo->stripe_count); - if (ret) { - gf_smsg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_SET_FAILED, - "Key=%s", key, NULL); - goto out; - } - keylen = snprintf(key, sizeof(key), "volume%d.replica_count", count); ret = dict_set_int32n(volumes, key, keylen, volinfo->replica_count); if (ret) { @@ -5846,8 +5838,7 @@ glusterd_get_state(rpcsvc_request_t *req, dict_t *dict) fprintf(fp, "Volume%d.snap_count: %" PRIu64 "\n", count, volinfo->snap_count); - fprintf(fp, "Volume%d.stripe_count: %d\n", count, - volinfo->stripe_count); + fprintf(fp, "Volume%d.stripe_count: %d\n", count, STRIPE_COUNT); fprintf(fp, "Volume%d.replica_count: %d\n", count, volinfo->replica_count); fprintf(fp, "Volume%d.subvol_count: %d\n", count, diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c index a10d24ff188..8e406068cda 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c @@ -2930,7 +2930,6 @@ glusterd_volume_quorum_check(glusterd_volinfo_t *volinfo, int64_t index, distribute_subvols = volinfo->brick_count / volinfo->dist_leaf_count; for (j = 0; j < distribute_subvols; j++) { /* by default assume quorum is not met - TODO: Handle distributed striped replicate volumes Currently only distributed replicate volumes are handled. */ diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 93b74434dc1..fd8bee25fad 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -800,12 +800,11 @@ glusterd_volume_exclude_options_write(int fd, glusterd_volinfo_t *volinfo) GF_VALIDATE_OR_GOTO(this->name, (conf != NULL), out); ret = snprintf(buf + total_len, sizeof(buf) - total_len, - "%s=%d\n%s=%d\n%s=%d\n%s=%d\n%s=%d\n%s=%d\n", + "%s=%d\n%s=%d\n%s=%d\n%s=%d\n%s=%d\n", GLUSTERD_STORE_KEY_VOL_TYPE, volinfo->type, GLUSTERD_STORE_KEY_VOL_COUNT, volinfo->brick_count, GLUSTERD_STORE_KEY_VOL_STATUS, volinfo->status, GLUSTERD_STORE_KEY_VOL_SUB_COUNT, volinfo->sub_count, - GLUSTERD_STORE_KEY_VOL_STRIPE_CNT, volinfo->stripe_count, GLUSTERD_STORE_KEY_VOL_REPLICA_CNT, volinfo->replica_count); if (ret < 0 || ret >= sizeof(buf) - total_len) { ret = -1; @@ -3112,9 +3111,6 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo) } else if (!strncmp(key, GLUSTERD_STORE_KEY_VOL_SUB_COUNT, SLEN(GLUSTERD_STORE_KEY_VOL_SUB_COUNT))) { volinfo->sub_count = atoi(value); - } else if (!strncmp(key, GLUSTERD_STORE_KEY_VOL_STRIPE_CNT, - SLEN(GLUSTERD_STORE_KEY_VOL_STRIPE_CNT))) { - volinfo->stripe_count = atoi(value); } else if (!strncmp(key, GLUSTERD_STORE_KEY_VOL_REPLICA_CNT, SLEN(GLUSTERD_STORE_KEY_VOL_REPLICA_CNT))) { volinfo->replica_count = atoi(value); @@ -3251,12 +3247,10 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo) { switch (volinfo->type) { case GF_CLUSTER_TYPE_NONE: - volinfo->stripe_count = 1; volinfo->replica_count = 1; break; case GF_CLUSTER_TYPE_REPLICATE: - volinfo->stripe_count = 1; volinfo->replica_count = volinfo->sub_count; break; @@ -3265,15 +3259,6 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo) GF_ASSERT(volinfo->redundancy_count > 0); break; - case GF_CLUSTER_TYPE_STRIPE: - case GF_CLUSTER_TYPE_STRIPE_REPLICATE: - gf_msg(this->name, GF_LOG_CRITICAL, ENOTSUP, - GD_MSG_VOLINFO_STORE_FAIL, - "The volume type is no more supported. Please refer to " - "glusterfs-6.0 release-notes for how to migrate from " - "this volume type"); - break; - default: GF_ASSERT(0); break; diff --git a/xlators/mgmt/glusterd/src/glusterd-store.h b/xlators/mgmt/glusterd/src/glusterd-store.h index 83f4df0783e..f24e73e40d5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.h +++ b/xlators/mgmt/glusterd/src/glusterd-store.h @@ -37,7 +37,6 @@ typedef enum glusterd_store_ver_ac_ { #define GLUSTERD_STORE_KEY_VOL_STATUS "status" #define GLUSTERD_STORE_KEY_VOL_PORT "port" #define GLUSTERD_STORE_KEY_VOL_SUB_COUNT "sub_count" -#define GLUSTERD_STORE_KEY_VOL_STRIPE_CNT "stripe_count" #define GLUSTERD_STORE_KEY_VOL_REPLICA_CNT "replica_count" #define GLUSTERD_STORE_KEY_VOL_DISPERSE_CNT "disperse_count" #define GLUSTERD_STORE_KEY_VOL_REDUNDANCY_CNT "redundancy_count" diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 04bb0461bf0..a3ae6d63056 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -836,7 +836,6 @@ glusterd_volinfo_dup(glusterd_volinfo_t *volinfo, new_volinfo->type = volinfo->type; new_volinfo->replica_count = volinfo->replica_count; new_volinfo->arbiter_count = volinfo->arbiter_count; - new_volinfo->stripe_count = volinfo->stripe_count; new_volinfo->disperse_count = volinfo->disperse_count; new_volinfo->redundancy_count = volinfo->redundancy_count; new_volinfo->dist_leaf_count = volinfo->dist_leaf_count; @@ -3132,11 +3131,6 @@ glusterd_add_volume_to_dict(glusterd_volinfo_t *volinfo, dict_t *dict, if (ret) goto out; - keylen = snprintf(key, sizeof(key), "%s.stripe_count", pfx); - ret = dict_set_int32n(dict, key, keylen, volinfo->stripe_count); - if (ret) - goto out; - keylen = snprintf(key, sizeof(key), "%s.replica_count", pfx); ret = dict_set_int32n(dict, key, keylen, volinfo->replica_count); if (ret) @@ -4616,14 +4610,6 @@ glusterd_import_volinfo(dict_t *peer_data, int count, goto out; } - /* not having a 'stripe_count' key is not a error - (as peer may be of old version) */ - keylen = snprintf(key, sizeof(key), "%s.stripe_count", key_prefix); - ret = dict_get_int32n(peer_data, key, keylen, &new_volinfo->stripe_count); - if (ret) - gf_msg(THIS->name, GF_LOG_INFO, 0, GD_MSG_DICT_GET_FAILED, - "peer is possibly old version"); - /* not having a 'replica_count' key is not a error (as peer may be of old version) */ keylen = snprintf(key, sizeof(key), "%s.replica_count", key_prefix); @@ -7385,22 +7371,15 @@ glusterd_restart_gsyncds(glusterd_conf_t *conf) return ret; } -int -glusterd_calc_dist_leaf_count(int rcount, int scount) -{ - return (rcount ? rcount : 1) * (scount ? scount : 1); -} - int glusterd_get_dist_leaf_count(glusterd_volinfo_t *volinfo) { - int rcount = volinfo->replica_count; - int scount = volinfo->stripe_count; - if (volinfo->type == GF_CLUSTER_TYPE_DISPERSE) return volinfo->disperse_count; + else if (volinfo->type == GF_CLUSTER_TYPE_REPLICATE) + return volinfo->replica_count; - return glusterd_calc_dist_leaf_count(rcount, scount); + return 1; } int diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index d0bcc2818ba..c75f30b22d4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -461,9 +461,6 @@ int glusterd_add_node_to_dict(char *server, dict_t *dict, int count, dict_t *vol_opts); -int -glusterd_calc_dist_leaf_count(int rcount, int scount); - int glusterd_get_dist_leaf_count(glusterd_volinfo_t *volinfo); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 8d6fb5e0fac..5bdef4d56ef 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -3549,8 +3549,6 @@ _xl_has_decommissioned_clients(xlator_t *xl, glusterd_volinfo_t *volinfo) xl_child = xl->children; while (xl_child) { cxl = xl_child->xlator; - /* this can go into 2 depths if the volume type - is stripe-replicate */ decommissioned = _xl_has_decommissioned_clients(cxl, volinfo); if (decommissioned) break; diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index 78e808ffcde..cca05520731 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -1998,8 +1998,6 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr) /* replica-count 1 means, no replication, file is in one brick only */ volinfo->replica_count = 1; - /* stripe-count 1 means, no striping, file is present as a whole */ - volinfo->stripe_count = 1; if (GF_CLUSTER_TYPE_REPLICATE == volinfo->type) { /* performance.client-io-threads is turned on to default, diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index b30237ed02a..fca4ea4ca71 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -74,7 +74,7 @@ #define GLUSTERD_SNAPS_MAX_SOFT_LIMIT_PERCENT 100 #define GLUSTERD_SERVER_QUORUM "server" #define STATUS_STRLEN 128 - +#define STRIPE_COUNT 1 #define FMTSTR_CHECK_VOL_EXISTS "Volume %s does not exist" #define FMTSTR_RESOLVE_BRICK "Could not find peer on which brick %s:%s resides" @@ -443,7 +443,6 @@ struct glusterd_volinfo_ { */ glusterd_volume_status status; int sub_count; /* backward compatibility */ - int stripe_count; int replica_count; int arbiter_count; int thin_arbiter_count;