From c55a0a287b18ace123964e017c759947a5fbac2f Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Fri, 11 Sep 2009 07:42:44 +0000 Subject: 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 BUG: 240 (segmentation fault in qr_readv) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=240 --- xlators/performance/quick-read/src/quick-read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/performance/quick-read/src/quick-read.c') 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)); -- cgit