Bug 761912 (GLUSTER-180)

Summary: fileop fails at chmod with stale file handle error over unfs3
Product: [Community] GlusterFS Reporter: Shehjar Tikoo <shehjart>
Component: libglusterfsclientAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: urgent    
Version: mainlineCC: gluster-bugs, lakshmipathi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shehjar Tikoo 2009-07-31 09:38:28 UTC
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.

Comment 1 Anand Avati 2009-07-31 15:40:31 UTC
PATCH: http://patches.gluster.com/patch/843 in master (libglusterfsclient: Invalidate iattr cache on reads)

Comment 2 Anand Avati 2009-07-31 15:40:39 UTC
PATCH: http://patches.gluster.com/patch/844 in release-2.0 (libglusterfsclient: Invalidate iattr cache on reads)