+++ This bug was initially created as a clone of Bug #1158129 +++ When md-cache is handling a readv callback, its logic is to skip checking the file's iatt (to see if it has changed since the time of the last cache) if "op_ret != 0". I suspect that is a mistake, and the intent was to skip only on error; for other fops, op_ret is 0 on success and nonzero on error, and md-cache has the same code for them. For readv, though, op_ret is the number of bytes read, so it will normally be positive except on EOF. The attached patch changes "op_ret != 0" to "op_ret < 0" to skip the check only when an error was returned. (Or, if the intent was really to check cache validity only on an EOF condition when op_ret is zero, then probably a comment to that effect should be added).
REVIEW: http://review.gluster.org/9129 (md-cache: cache the iatt when readv() was successful) posted (#1) for review on master by Niels de Vos (ndevos)
COMMIT: http://review.gluster.org/9129 committed in master by Vijay Bellur (vbellur) ------ commit 83a4cdaa1972a16603e19916e093674b60680bb0 Author: Niels de Vos <ndevos> Date: Sat Nov 15 22:44:09 2014 +0100 md-cache: cache the iatt when readv() was successful When md-cache is handling a readv callback, its logic is to skip checking the file's iatt (to see if it has changed since the time of the last cache) if "op_ret != 0". This is a mistake, and the intent was to skip only on error; for other fops, op_ret is 0 on success and nonzero on error, and md-cache has the same code for them. For readv, though, op_ret is the number of bytes read, so it will normally be positive except on EOF. BUG: 1164503 Change-Id: Ifc0f2084b41b6f8d075a9260dc7cf69e97535eed Original-author: Philip Spencer <pspencer.ca> Signed-off-by: Niels de Vos <ndevos> Reviewed-on: http://review.gluster.org/9129 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Xavier Hernandez <xhernandez> Reviewed-by: Vijay Bellur <vbellur>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report. glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user