Bug 761881 (GLUSTER-149)

Summary: libglusterfsclient interacts incorrectly with write-behind on writev
Product: [Community] GlusterFS Reporter: Shehjar Tikoo <shehjart>
Component: libglusterfsclientAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: gluster-bugs
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: RTP 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-17 11:17:42 UTC
Avati, I've been able to reproduce the problem as we'd discussed and the fix resolves the problem while having write-behind in the xlator tree.

Proposed fixes:
release2.0 - http://patches.gluster.com/patch/763/
mainline - http://patches.gluster.com/patch/764/

Comment 1 Shehjar Tikoo 2009-07-17 14:11:58 UTC
The problem is simple. A few weeks back, we committed a patch that updates the iattr cache in libglusterfsclient on a writev. The problem is that if write-behind is a translator under libglusterfsclient, the stat buf returned by writev_cbk will be filled with 0s. In that case, updating the iattr cache with that stat buf results in corrupted data in the iattr cache.

The fix lies in invalidating the cache on a writev_cbk so that the next stat of lookup results in a fresh stat and revalidation of the iattr cache.

Comment 2 Anand Avati 2009-07-17 16:01:28 UTC
PATCH: http://patches.gluster.com/patch/764 in master (libglusterfsclient: Invalidate not update iattr cache on writev)

Comment 3 Anand Avati 2009-07-17 16:01:32 UTC
PATCH: http://patches.gluster.com/patch/763 in release-2.0 (libglusterfsclient: Invalidate not update iattr cache on writev)