Hide Forgot
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/
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.
PATCH: http://patches.gluster.com/patch/764 in master (libglusterfsclient: Invalidate not update iattr cache on writev)
PATCH: http://patches.gluster.com/patch/763 in release-2.0 (libglusterfsclient: Invalidate not update iattr cache on writev)
Committed to repo: master: http://git.savannah.gnu.org/cgit/gluster.git/commit/?id=4b3633cde1bb9a9a692eade129e4a45dbf82d8ec release-2.0: http://git.savannah.gnu.org/cgit/gluster.git/commit/?h=release-2.0&id=dbccda35cdcad06208e2fc7554287b539e0060a6