summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-09-11 07:42:44 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-17 01:28:25 -0700
commitc55a0a287b18ace123964e017c759947a5fbac2f (patch)
tree377ffc255e59aceb1dbbbafb8009172ebb80bc76 /xlators/performance/quick-read/src
parenta767c08c0e92e2e8caf4667d97aa5e5c3a13efb0 (diff)
performance/quick-read: access glusterfs_ctx from xlator instead of using glusterfs_get_ctx
- since glusterfs_get_ctx gets the global context pointer, there can be problems in a multithreaded application running on libglusterfsclient doing multiple glusterfs_inits. Hence use context specific to the current xlator tree stored in each xlator object. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 240 (segmentation fault in qr_readv) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=240
Diffstat (limited to 'xlators/performance/quick-read/src')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 9e09422bb79..9e036eb1557 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -755,7 +755,7 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
}
}
- ctx = glusterfs_ctx_get ();
+ ctx = this->ctx;
count = (op_ret / ctx->page_size) + 1;
vector = CALLOC (count,
sizeof (*vector));