summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-07-27 09:30:48 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-27 11:33:31 -0700
commitccd93eb64c0f2f73f83e025d3efae794803aaa4c (patch)
treef4c37d7f954431c870b75e590a4a3be7deda3a8c /xlators/cluster
parentffa5118b2eec9cd12e43ca10d86e91d02a9090a8 (diff)
cluster/afr: Return same inode number in stat buf for readv_cbk
Remember the inode number that had been returned in lookup_cbk and set the stat buf->ino to the same. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 166 (libglusterfsclient: Cached stat buf inode is different from ino in inode_t) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=166
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c3
-rw-r--r--xlators/cluster/afr/src/afr.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 4819d06cdbc..25fe69ca65c 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -796,6 +796,8 @@ afr_readv_cbk (call_frame_t *frame, void *cookie,
out:
if (unwind) {
+ buf->st_ino = local->cont.readv.ino;
+
AFR_STACK_UNWIND (frame, op_ret, op_errno, vector, count, buf,
iobref);
}
@@ -855,6 +857,7 @@ afr_readv (call_frame_t *frame, xlator_t *this,
local->fd = fd_ref (fd);
+ local->cont.readv.ino = fd->inode->ino;
local->cont.readv.size = size;
local->cont.readv.offset = offset;
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 87ef2633391..d9a3435c3f4 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -231,6 +231,7 @@ typedef struct _afr_local {
} getxattr;
struct {
+ ino_t ino;
size_t size;
off_t offset;
int last_tried;