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:
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/12099 (features/shard: Fix incorrect op_ret in READV) posted (#2) for review on master by Krutika Dhananjay (kdhananj)
COMMIT: http://review.gluster.org/12099 committed in master by Jeff Darcy (jdarcy) ------ commit fe7b37960bbef791d9bed79760b61b1d40ca81cd Author: Krutika Dhananjay <kdhananj> Date: Thu Sep 3 15:47:01 2015 +0530 features/shard: Fix incorrect op_ret in READV Change-Id: I31ac99b290f82f4b74236c206193f7641c73d4dc BUG: 1259651 Signed-off-by: Krutika Dhananjay <kdhananj> Reviewed-on: http://review.gluster.org/12099 Reviewed-by: Pranith Kumar Karampuri <pkarampu> 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-3.8.0, please open a new bug report. glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/ [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user