summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2017-01-20 16:09:13 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-02-02 05:02:30 -0500
commit85d7f1d1ee24ac400d4aa223478727643532693a (patch)
tree10356a559fb88b4b1c676232ec6172ede82c73d0 /xlators/performance
parentc8a23cc6cd289dd28deb136bf2550f28e2761ef3 (diff)
performance/write-behind: access stub only if available during
statedump Change-Id: Ia5dd718458a5e32138012f81f014d13fc6b28be2 BUG: 1415115 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://review.gluster.org/16440 Reviewed-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/write-behind/src/write-behind.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 877d9217f5d..738faea725e 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -393,10 +393,10 @@ __wb_request_unref (wb_request_t *req)
list_del_init (&req->winds);
list_del_init (&req->unwinds);
- if (req->stub && req->ordering.tempted) {
+ if (req->stub) {
call_stub_destroy (req->stub);
req->stub = NULL;
- } /* else we would have call_resume()'ed */
+ }
if (req->iobref)
iobref_unref (req->iobref);
@@ -1659,21 +1659,20 @@ __wb_pick_winds (wb_inode_t *wb_inode, list_head_t *tasks,
void
wb_do_winds (wb_inode_t *wb_inode, list_head_t *tasks)
{
- wb_request_t *req = NULL;
- wb_request_t *tmp = NULL;
+ wb_request_t *req = NULL;
+ wb_request_t *tmp = NULL;
list_for_each_entry_safe (req, tmp, tasks, winds) {
- list_del_init (&req->winds);
+ list_del_init (&req->winds);
if (req->op_ret == -1) {
- call_unwind_error (req->stub, req->op_ret,
- req->op_errno);
+ call_unwind_error_keep_stub (req->stub, req->op_ret,
+ req->op_errno);
} else {
- call_resume (req->stub);
+ call_resume_keep_stub (req->stub);
}
- req->stub = NULL;
- wb_request_unref (req);
+ wb_request_unref (req);
}
}
@@ -2814,8 +2813,9 @@ __wb_dump_requests (struct list_head *head, char *prefix)
gf_proc_dump_write ("size", "%"GF_PRI_SIZET,
req->write_size);
- gf_proc_dump_write ("offset", "%"PRId64,
- req->stub->args.offset);
+ if (req->stub)
+ gf_proc_dump_write ("offset", "%"PRId64,
+ req->stub->args.offset);
flag = req->ordering.lied;
gf_proc_dump_write ("lied", "%d", flag);