summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 7673fa83433..fd4618bb78c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -74,14 +74,14 @@ add_brick_at_right_order (glusterd_brickinfo_t *brickinfo,
insert_brick:
i = 0;
- list_for_each_entry (brick, &volinfo->bricks, brick_list) {
+ cds_list_for_each_entry (brick, &volinfo->bricks, brick_list) {
i++;
if (i < idx)
continue;
gf_log (THIS->name, GF_LOG_DEBUG, "brick:%s index=%d, count=%d",
brick->path, idx, count);
- list_add (&brickinfo->brick_list, &brick->brick_list);
+ cds_list_add (&brickinfo->brick_list, &brick->brick_list);
break;
}
@@ -581,7 +581,7 @@ subvol_matcher_update (int *subvols, glusterd_volinfo_t *volinfo,
int32_t sub_volume = 0;
int pos = 0;
- list_for_each_entry (tmp, &volinfo->bricks, brick_list) {
+ cds_list_for_each_entry (tmp, &volinfo->bricks, brick_list) {
if (strcmp (tmp->hostname, brickinfo->hostname) ||
strcmp (tmp->path, brickinfo->path)) {
@@ -1085,7 +1085,8 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
add_brick_at_right_order (brickinfo, volinfo, (i - 1),
stripe_count, replica_count);
} else {
- list_add_tail (&brickinfo->brick_list, &volinfo->bricks);
+ cds_list_add_tail (&brickinfo->brick_list,
+ &volinfo->bricks);
}
brick = strtok_r (NULL, " \n", &saveptr);
i++;
@@ -1707,7 +1708,8 @@ glusterd_remove_brick_migrate_cbk (glusterd_volinfo_t *volinfo,
break;
case GF_DEFRAG_STATUS_STOPPED:
/* Fall back to the old volume file */
- list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks, brick_list) {
+ cds_list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
+ brick_list) {
if (!brickinfo->decommissioned)
continue;
brickinfo->decommissioned = 0;
@@ -1717,7 +1719,8 @@ glusterd_remove_brick_migrate_cbk (glusterd_volinfo_t *volinfo,
case GF_DEFRAG_STATUS_COMPLETE:
/* Done with the task, you can remove the brick from the
volume file */
- list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks, brick_list) {
+ cds_list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
+ brick_list) {
if (!brickinfo->decommissioned)
continue;
gf_log (THIS->name, GF_LOG_INFO, "removing the brick %s",
@@ -1909,8 +1912,8 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
case GF_OP_CMD_STOP:
{
/* Fall back to the old volume file */
- list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
- brick_list) {
+ cds_list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
+ brick_list) {
if (!brickinfo->decommissioned)
continue;
brickinfo->decommissioned = 0;