diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2009-07-31 04:14:48 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-31 11:40:29 -0700 |
commit | 2f8a834e7b6acef73795237d6c6269eb9838de53 (patch) | |
tree | 342ae141e5203b56f84e68194d34c44789f1254b /libglusterfsclient | |
parent | fdbc5cf320fe85d128d498184135df10146047ba (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
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index cf85ba90284..187df1b7625 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); |