+++ This bug was initially created as a clone of Bug #1259651 +++ Description of problem: Found a bug while reading code where if a readv() falls partly in a region of the sharded file that contains holes which are represented by the existence of zero-byte shards (for instance block-0 file is one example which will exist by default since creation under its parent directory but _may_ not have any data written into it and there could be other blocks that are written to by the application). In this case, a read on such a shard would return 0 bytes, although internally shard translator is supposed to interpret that as a hole (filled with zeroes) and update op_ret (the final exit status of the read which is the number of bytes read) based on the following logic: read size of ith shard = { shard_block_size if (last_shard_index > i), (offset % shard_block_size) otherwise Failing to do so could cause reads from the application to prematurely exit if shard translator returns "zero bytes read" status, or in some cases return fewer bytes read than are actually filled in the actual buffer, which could mislead the translators above shard or even the application. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: --- Additional comment from Vijay Bellur on 2015-09-03 06:31:36 EDT --- REVIEW: http://review.gluster.org/12099 (features/shard: Fix incorrect op_ret in READV) posted (#1) for review on master by Krutika Dhananjay (kdhananj)
REVIEW: http://review.gluster.org/12101 (features/shard: Fix incorrect op_ret in READV) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)
COMMIT: http://review.gluster.org/12101 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) ------ commit 5bb4143e0a59ad69ac6ef74c2957784cf660c1fd Author: Krutika Dhananjay <kdhananj> Date: Thu Sep 3 15:47:01 2015 +0530 features/shard: Fix incorrect op_ret in READV Backport of: http://review.gluster.org/#/c/12099/ Change-Id: Ica5f951a3cb2243fe179fe84a27c369bd7de23cf BUG: 1259726 Signed-off-by: Krutika Dhananjay <kdhananj> Reviewed-on: http://review.gluster.org/12101 Reviewed-by: Pranith Kumar Karampuri <pkarampu> Tested-by: Gluster Build System <jenkins.com> Tested-by: NetBSD Build System <jenkins.org>
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-glusterfs-3.7.5, please open a new bug report. glusterfs-glusterfs-3.7.5 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://www.gluster.org/pipermail/gluster-users/2015-October/023968.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user
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.5, please open a new bug report. glusterfs-3.7.5 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://www.gluster.org/pipermail/gluster-users/2015-October/023968.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user