diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-11-17 17:01:47 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-11-18 05:16:03 -0800 |
commit | e06adccb38f3dc91a4534232237e07589cd07426 (patch) | |
tree | e4d9b65ba46d09879e64cee20bfe8283fa877e0d /xlators/cluster | |
parent | 92919e7de3d9ceaa70d4103266fc438dd28441cc (diff) |
cluster/ec: Mark self-heal fops as internal
Change-Id: I8ae7af266d3e00460f0cfdc9389a926e5f2fee36
BUG: 1282761
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/12598
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 6 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heald.c | 6 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-heal.c | 4 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-heald.c | 4 |
6 files changed, 13 insertions, 11 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index dae1b9d8a48..9f47484e043 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -824,7 +824,7 @@ afr_inode_refresh_done (call_frame_t *frame, xlator_t *this) if (ret && afr_selfheal_enabled (this)) { heal = copy_frame (frame); if (heal) - heal->root->pid = GF_CLIENT_PID_AFR_SELF_HEALD; + heal->root->pid = GF_CLIENT_PID_SELF_HEALD; ret = synctask_new (this->ctx->env, afr_refresh_selfheal_wrap, afr_refresh_selfheal_done, heal, frame); if (ret) @@ -1912,7 +1912,7 @@ afr_lookup_metadata_heal_check (call_frame_t *frame, xlator_t *this) heal = copy_frame (frame); if (heal) - heal->root->pid = GF_CLIENT_PID_AFR_SELF_HEALD; + heal->root->pid = GF_CLIENT_PID_SELF_HEALD; ret = synctask_new (this->ctx->env, afr_lookup_sh_metadata_wrap, afr_refresh_selfheal_done, heal, frame); if(ret) @@ -2000,7 +2000,7 @@ afr_lookup_entry_heal (call_frame_t *frame, xlator_t *this) if (need_heal) { heal = copy_frame (frame); if (heal) - heal->root->pid = GF_CLIENT_PID_AFR_SELF_HEALD; + heal->root->pid = GF_CLIENT_PID_SELF_HEALD; ret = synctask_new (this->ctx->env, afr_lookup_selfheal_wrap, afr_refresh_selfheal_done, heal, frame); if (ret) diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 454124fadb1..297d7b8b0dd 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -1419,7 +1419,7 @@ afr_handle_replace_brick (xlator_t *this, call_frame_t *frame, loc_t *loc, ret = dict_get_str (dict, GF_AFR_REPLACE_BRICK, &replace_brick); if (!ret) { - if (frame->root->pid != GF_CLIENT_PID_AFR_SELF_HEALD) { + if (frame->root->pid != GF_CLIENT_PID_SELF_HEALD) { gf_log (this->name, GF_LOG_ERROR, "'%s' is an internal" " extended attribute : %s.", GF_AFR_REPLACE_BRICK, strerror (EPERM)); diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index cd2dc10be27..c2ea4e96dc9 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1262,7 +1262,7 @@ afr_frame_create (xlator_t *this) call_frame_t *frame = NULL; afr_local_t *local = NULL; int op_errno = 0; - pid_t pid = GF_CLIENT_PID_AFR_SELF_HEALD; + pid_t pid = GF_CLIENT_PID_SELF_HEALD; frame = create_frame (this, this->ctx->pool); if (!frame) diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c index c408abb444e..028d3ec4256 100644 --- a/xlators/cluster/afr/src/afr-self-heald.c +++ b/xlators/cluster/afr/src/afr-self-heald.c @@ -442,7 +442,7 @@ afr_shd_index_sweep (struct subvol_healer *healer) return -errno; } - ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_AFR_SELF_HEALD, + ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD, healer, afr_shd_index_heal); inode_forget (loc.inode, 1); @@ -483,7 +483,7 @@ afr_shd_full_sweep (struct subvol_healer *healer, inode_t *inode) priv = healer->this->private; loc.inode = inode; return syncop_ftw (priv->children[healer->subvol], &loc, - GF_CLIENT_PID_AFR_SELF_HEALD, healer, + GF_CLIENT_PID_SELF_HEALD, healer, afr_shd_full_heal); } @@ -900,7 +900,7 @@ afr_shd_gather_index_entries (xlator_t *this, int child, dict_t *output) return -errno; } - ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_AFR_SELF_HEALD, + ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD, output, afr_shd_gather_entry); inode_forget (loc.inode, 1); loc_wipe (&loc); diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index 10dc9f158e7..d80cdabc5ab 100644 --- a/xlators/cluster/ec/src/ec-heal.c +++ b/xlators/cluster/ec/src/ec-heal.c @@ -1369,7 +1369,7 @@ ec_heal_names (call_frame_t *frame, ec_t *ec, inode_t *inode, if (!participants[i]) continue; syncop_dir_scan (ec->xl_list[i], &loc, - GF_CLIENT_PID_AFR_SELF_HEALD, &name_data, + GF_CLIENT_PID_SELF_HEALD, &name_data, ec_name_heal_handler); for (j = 0; j < ec->nodes; j++) if (name_data.failed_on[j]) @@ -2325,6 +2325,8 @@ ec_heal_do (xlator_t *this, void *data, loc_t *loc, int32_t partial) /*Do heal as root*/ frame->root->uid = 0; frame->root->gid = 0; + /*Mark the fops as internal*/ + frame->root->pid = GF_CLIENT_PID_SELF_HEALD; participants = alloca0(ec->nodes); ec_mask_to_char_array (ec->xl_up, participants, ec->nodes); if (loc->name && strlen (loc->name)) { diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c index 20724c778bf..95cff00b283 100644 --- a/xlators/cluster/ec/src/ec-heald.c +++ b/xlators/cluster/ec/src/ec-heald.c @@ -294,7 +294,7 @@ ec_shd_index_sweep (struct subvol_healer *healer) goto out; } - ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_AFR_SELF_HEALD, + ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD, healer, ec_shd_index_heal); out: if (loc.inode) @@ -352,7 +352,7 @@ ec_shd_full_sweep (struct subvol_healer *healer, inode_t *inode) ec = healer->this->private; loc.inode = inode; return syncop_ftw (ec->xl_list[healer->subvol], &loc, - GF_CLIENT_PID_AFR_SELF_HEALD, healer, + GF_CLIENT_PID_SELF_HEALD, healer, ec_shd_full_heal); } |