diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-11-17 17:01:47 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-03-04 17:26:21 -0800 |
commit | 9504c104d16856095ee99180d38aef02e51b0d60 (patch) | |
tree | c25846eb3938fadc5e58133abe99c5790fcd94c4 /xlators | |
parent | 49da065720919faeb98bae418eccb24498230788 (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>
BUG: 1283757
Change-Id: Ic20d4ee031265305db1a6ed2cf591ce94b7d0749
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/12668
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-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 | 4 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-heal.c | 4 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-heald.c | 4 | ||||
-rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 2 | ||||
-rw-r--r-- | xlators/features/changetimerecorder/src/ctr-helper.h | 2 | ||||
-rw-r--r-- | xlators/features/marker/src/marker.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-replace-brick.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 2 |
11 files changed, 17 insertions, 15 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index ccdaaaaf052..96ed41d3abf 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -839,7 +839,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) @@ -2033,7 +2033,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) @@ -2121,7 +2121,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 d800a3476d0..88f885d3422 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -1424,7 +1424,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 651c7ee3326..6e90de039ce 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1281,7 +1281,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 9b8b8e85f2b..d77a9ec549e 100644 --- a/xlators/cluster/afr/src/afr-self-heald.c +++ b/xlators/cluster/afr/src/afr-self-heald.c @@ -446,7 +446,7 @@ afr_shd_index_sweep (struct subvol_healer *healer, char *vgfid) 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); @@ -510,7 +510,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); } diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index 1a353b9b2e7..94ff4757b4d 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 0c84a890fad..2e5098a3612 100644 --- a/xlators/cluster/ec/src/ec-heald.c +++ b/xlators/cluster/ec/src/ec-heald.c @@ -293,7 +293,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) @@ -351,7 +351,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); } diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index d88dbaa0c15..b4f0ed053ae 100644 --- a/xlators/features/changelog/src/changelog-helpers.h +++ b/xlators/features/changelog/src/changelog-helpers.h @@ -625,7 +625,7 @@ resolve_pargfid_to_path (xlator_t *this, uuid_t gfid, char **path, char *bname); * ignore internal fops for all clients except AFR self-heal daemon */ #define CHANGELOG_IF_INTERNAL_FOP_THEN_GOTO(frame, dict, label) do { \ - if ((frame->root->pid != GF_CLIENT_PID_AFR_SELF_HEALD) \ + if ((frame->root->pid != GF_CLIENT_PID_SELF_HEALD) \ && dict \ && dict_get (dict, GLUSTERFS_INTERNAL_FOP_KEY)) \ goto label; \ diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index cf71337a8f5..e80bb2d7cb7 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -341,7 +341,7 @@ out: * If its a AFR SELF HEAL * */ #define AFR_SELF_HEAL_FOP(frame)\ - (frame->root->pid == GF_CLIENT_PID_AFR_SELF_HEALD) + (frame->root->pid == GF_CLIENT_PID_SELF_HEALD) /* * if a rebalancer fop goto diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index ebe18d613c5..4a50d275a89 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -993,7 +993,7 @@ marker_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, marker_conf_t *priv = NULL; marker_local_t *local = NULL; uint32_t nlink = -1; - int32_t ret = 0; + GF_UNUSED int32_t ret = 0; if (op_ret == -1) { gf_log (this->name, GF_LOG_TRACE, diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c index 1219ae1f38a..f1c3637270b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c +++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c @@ -79,7 +79,7 @@ glusterd_handle_replicate_replace_brick (glusterd_volinfo_t *volinfo, DEFAULT_LOG_FILE_DIRECTORY"/%s-replace-brick-mount.log", volinfo->volname); - ret = gf_asprintf (&pid, "%d", GF_CLIENT_PID_AFR_SELF_HEALD); + ret = gf_asprintf (&pid, "%d", GF_CLIENT_PID_SELF_HEALD); if (ret < 0) goto out; diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 24d617f9291..48df41c4df6 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -475,7 +475,7 @@ get_frame_from_request (rpcsvc_request_t *req) req->pid != GF_CLIENT_PID_NO_ROOT_SQUASH && req->pid != GF_CLIENT_PID_GSYNCD && req->pid != GF_CLIENT_PID_DEFRAG && - req->pid != GF_CLIENT_PID_AFR_SELF_HEALD && + req->pid != GF_CLIENT_PID_SELF_HEALD && req->pid != GF_CLIENT_PID_QUOTA_MOUNT) RPC_AUTH_ROOT_SQUASH (req); |