summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/io-cache.c
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2018-11-28 14:14:00 +0530
committersoumya k <skoduri@redhat.com>2018-12-30 13:32:00 +0000
commitcee5f93ac00f628539f0367bc4958d59b98af011 (patch)
tree223f809277de52601b0d48f40bb463eb536b3643 /xlators/performance/io-cache/src/io-cache.c
parent12aa9058df9bae0e0409f8554f70498caa59aa46 (diff)
io-cache: xdata needs to be passed for readv operations
io-cache xlator has been skipping xdata references when the date needs to be read into page cache. This patch fixes the same. Note: similar changes may be needed for other fops as well which are handled by io-cache. Change-Id: I28d73d4ba471d13eb55d0fd0b5197d222df77a2a updates: bz#1651323 Signed-off-by: Soumya Koduri <skoduri@redhat.com> (cherry picked from commit b3d88a0904131f6851f4185e43f815ecc3353ab5)
Diffstat (limited to 'xlators/performance/io-cache/src/io-cache.c')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index cea8667fe43..36d5c791278 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -409,6 +409,7 @@ ioc_cache_validate_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
* fd_ref on fd, safe to unref validate frame's private copy
*/
fd_unref(local->fd);
+ dict_unref(local->xattr_req);
STACK_DESTROY(frame->root);
@@ -491,10 +492,13 @@ ioc_cache_validate(call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
validate_local->fd = fd_ref(fd);
validate_local->inode = ioc_inode;
+ if (local && local->xattr_req)
+ validate_local->xattr_req = dict_ref(local->xattr_req);
validate_frame->local = validate_local;
STACK_WIND(validate_frame, ioc_cache_validate_cbk, FIRST_CHILD(frame->this),
- FIRST_CHILD(frame->this)->fops->fstat, fd, NULL);
+ FIRST_CHILD(frame->this)->fops->fstat, fd,
+ validate_local->xattr_req);
out:
return ret;
@@ -1137,6 +1141,7 @@ ioc_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
local->offset = offset;
local->size = size;
local->inode = ioc_inode;
+ local->xattr_req = dict_ref(xdata);
gf_msg_trace(this->name, 0,
"NEW REQ (%p) offset "