summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-07-31 04:15:13 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-31 11:40:36 -0700
commitcc58f457acfc452d8076b273c9bdab6cf0f9bb29 (patch)
tree453e2257a980c384d6b1602adfe6f3c5f78123a3
parent5e3ca250dd50f5723bc6a2034c0d637f6cfd941d (diff)
libglusterfsclient: Invalidate iattr cache on reads
Earlier we have invalidated the iattr cache on writes. Now we need to do so for reads also, so that we are not updating the iattr cache with 0-filled stat received from io-cache. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 180 (fileop fails at chmod with stale file handle error over unfs3) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=180
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index b63b2bc7a..a680e240f 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -3219,8 +3219,7 @@ libgf_client_read (libglusterfs_client_ctx_t *ctx,
}
stbuf = &stub->args.readv_cbk.stbuf;
libgf_transform_devnum (ctx, stbuf);
- libgf_update_iattr_cache (fd->inode, LIBGF_UPDATE_STAT,
- stbuf);
+ libgf_invalidate_iattr_cache (fd->inode, LIBGF_INVALIDATE_STAT);
}
call_stub_destroy (stub);
@@ -3346,8 +3345,7 @@ libgf_client_readv (libglusterfs_client_ctx_t *ctx,
stbuf = &stub->args.readv_cbk.stbuf;
libgf_transform_devnum (ctx, stbuf);
- libgf_update_iattr_cache (local->fd->inode, LIBGF_UPDATE_STAT,
- stbuf);
+ libgf_invalidate_iattr_cache (fd->inode, LIBGF_UPDATE_STAT);
}
call_stub_destroy (stub);