summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-04 19:05:28 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-24 10:09:59 -0700
commit15c62e283dab7a1e84b875c9506613b716d05d51 (patch)
tree1502342fa53f2b618cf9140dd125b0d8e0d9caf8 /libglusterfs
parent2de43f41b0d9a4e6b08447e86cc83ac3f4bc7684 (diff)
cluster/afr: Do heals with shd pid
Multi-threaded healing doesn't create synctask with shd pid, this leads to healing problems when quota exceeds. >BUG: 1332994 >Change-Id: I80f57c1923756f3298730b8820498127024e1209 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14211 >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> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> Change-Id: Id3f3ee44b27db7dbf94f3e7a9a6bfd7412d44ab8 BUG: 1335686 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14313 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 'libglusterfs')
-rw-r--r--libglusterfs/src/syncop-utils.c19
-rw-r--r--libglusterfs/src/syncop-utils.h6
2 files changed, 13 insertions, 12 deletions
diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c
index 5e6b9fa..8998c06 100644
--- a/libglusterfs/src/syncop-utils.c
+++ b/libglusterfs/src/syncop-utils.c
@@ -289,10 +289,11 @@ _dir_scan_job_fn (void *data)
}
static int
-_run_dir_scan_task (xlator_t *subvol, loc_t *parent, gf_dirent_t *q,
- gf_dirent_t *entry, int *retval, pthread_mutex_t *mut,
- pthread_cond_t *cond, uint32_t *jobs_running,
- uint32_t *qlen, syncop_dir_scan_fn_t fn, void *data)
+_run_dir_scan_task (call_frame_t *frame, xlator_t *subvol, loc_t *parent,
+ gf_dirent_t *q, gf_dirent_t *entry, int *retval,
+ pthread_mutex_t *mut, pthread_cond_t *cond,
+ uint32_t *jobs_running, uint32_t *qlen,
+ syncop_dir_scan_fn_t fn, void *data)
{
int ret = 0;
struct syncop_dir_scan_data *scan_data = NULL;
@@ -318,7 +319,7 @@ _run_dir_scan_task (xlator_t *subvol, loc_t *parent, gf_dirent_t *q,
scan_data->retval = retval;
ret = synctask_new (subvol->ctx->env, _dir_scan_job_fn,
- _dir_scan_job_fn_cbk, NULL, scan_data);
+ _dir_scan_job_fn_cbk, frame, scan_data);
out:
if (ret < 0) {
gf_dirent_entry_free (entry);
@@ -334,9 +335,9 @@ out:
}
int
-syncop_mt_dir_scan (xlator_t *subvol, loc_t *loc, int pid, void *data,
- syncop_dir_scan_fn_t fn, dict_t *xdata, uint32_t max_jobs,
- uint32_t max_qlen)
+syncop_mt_dir_scan (call_frame_t *frame, xlator_t *subvol, loc_t *loc, int pid,
+ void *data, syncop_dir_scan_fn_t fn, dict_t *xdata,
+ uint32_t max_jobs, uint32_t max_qlen)
{
fd_t *fd = NULL;
uint64_t offset = 0;
@@ -433,7 +434,7 @@ syncop_mt_dir_scan (xlator_t *subvol, loc_t *loc, int pid, void *data,
if (!entry)
continue;
- ret = _run_dir_scan_task (subvol, loc, &q, entry,
+ ret = _run_dir_scan_task (frame, subvol, loc, &q, entry,
&retval, &mut, &cond,
&jobs_running, &qlen, fn, data);
if (ret)
diff --git a/libglusterfs/src/syncop-utils.h b/libglusterfs/src/syncop-utils.h
index 52bcfd9..3968d75 100644
--- a/libglusterfs/src/syncop-utils.h
+++ b/libglusterfs/src/syncop-utils.h
@@ -19,9 +19,9 @@ syncop_ftw (xlator_t *subvol, loc_t *loc, int pid, void *data,
void *data));
int
-syncop_mt_dir_scan (xlator_t *subvol, loc_t *loc, int pid, void *data,
- syncop_dir_scan_fn_t fn, dict_t *xdata, uint32_t max_jobs,
- uint32_t max_qlen);
+syncop_mt_dir_scan (call_frame_t *frame, xlator_t *subvol, loc_t *loc, int pid,
+ void *data, syncop_dir_scan_fn_t fn, dict_t *xdata,
+ uint32_t max_jobs, uint32_t max_qlen);
int
syncop_dir_scan (xlator_t *subvol, loc_t *loc, int pid, void *data,