Bug 1342298

Summary: reading file with size less than 512 fails with odirect read
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: shardingAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-27 18:12:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pranith Kumar K 2016-06-02 22:55:46 UTC
Description of problem:
If we read a file with size less than 512 it fails with EINVAL because shard xlator modifies the readv size to actual size in that case which is unaligned.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-06-02 23:10:54 UTC
REVIEW: http://review.gluster.org/14623 (features/shard: Don't modify readv size) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 2 Vijay Bellur 2016-06-03 00:49:26 UTC
REVIEW: http://review.gluster.org/14623 (features/shard: Don't modify readv size) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 3 Vijay Bellur 2016-06-06 07:26:56 UTC
REVIEW: http://review.gluster.org/14623 (features/shard: Don't modify readv size) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 4 Vijay Bellur 2016-06-06 15:13:00 UTC
COMMIT: http://review.gluster.org/14623 committed in master by Jeff Darcy (jdarcy) 
------
commit 04b5fcb82e90250cdeaa6f0e1e4c4debdeb0e3fa
Author: Pranith Kumar K <pkarampu>
Date:   Fri Jun 3 04:22:27 2016 +0530

    features/shard: Don't modify readv size
    
    For o-direct reads application sends aligned size which needs to be
    sent as is, otherwise o-direct writes where the file-size is not
    aligned fails.
    
    Change-Id: I097418ad92eda6c835d7352a3d2e53ea9d8e2424
    BUG: 1342298
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/14623
    CentOS-regression: Gluster Build System <jenkins.com>
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Krutika Dhananjay <kdhananj>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 5 Shyamsundar 2017-03-27 18:12:03 UTC
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.9.0, please open a new bug report.

glusterfs-3.9.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://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/