GF_CLIENT_PID_DEFRAG = -3,
GF_CLIENT_PID_NO_ROOT_SQUASH = -4,
GF_CLIENT_PID_QUOTA_MOUNT = -5,
- GF_CLIENT_PID_AFR_SELF_HEALD = -6,
+ GF_CLIENT_PID_SELF_HEALD = -6,
GF_CLIENT_PID_GLFS_HEAL = -7,
GF_CLIENT_PID_BITD = -8,
GF_CLIENT_PID_SCRUB = -9,
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)
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)
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)
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));
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)
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);
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);
}
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);
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])
/*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)) {
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)
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);
}
* 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; \
* 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
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,
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;
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);