Hide Forgot
Here is another stale file handle error occurring at the chmod stage in a fileop run. The bug involves the use of io-cache. The problem is that before a chmod, fileop does reads on the file. In libglusterfsclient, every read updates the iattr cache. In io-cache, if the reads are from the cache, the read callback contains a stat struct filled with zeroes. This is used to update the iattr cache. On a subsequent use of the file handle cache in unfs3booster, the fh cache does an lstat. This lstat in libglusterfsclient returns a 0-filled stat which was cached earlier. Since the (dev, ino) pair in the file handle does not match the (dev, ino) received in stat, unfs3 returns an ESTALE. Patch is on the way.
PATCH: http://patches.gluster.com/patch/843 in master (libglusterfsclient: Invalidate iattr cache on reads)
PATCH: http://patches.gluster.com/patch/844 in release-2.0 (libglusterfsclient: Invalidate iattr cache on reads)
Fixed in mainline: http://git.gluster.com/?p=glusterfs.git;a=commit;h=2f8a834e7b6acef73795237d6c6269eb9838de53 in release-2.0: http://git.gluster.com/?p=glusterfs.git;a=commit;h=cc58f457acfc452d8076b273c9bdab6cf0f9bb29