Bug 1364449

Summary: posix: honour fsync flags in posix_do_zerofill
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: posixAssignee: Ravishankar N <ravishankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
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:
: 1364497 (view as bug list) Environment:
Last Closed: 2017-03-27 18:18:00 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:
Bug Depends On:    
Bug Blocks: 1364497    

Description Ravishankar N 2016-08-05 11:30:07 UTC
commit 6d994661db96cad43f26d0d1e2fba31dce9a76f5 introduced fallocate +
    FALLOC_FL_ZERO_RANGE to do posix_do_zerofill but did not do an fsync if
    O_SYNC or O_DSYNC fd flags were set. Prashant Pai pointed out performing
    fallocate(2) does not remove the necessity to do fsyncs if durability is
    desired: http://linux-fsdevel.vger.kernel.narkive.com/bDmrAUlh/fallocate-falloc-fl-punch-hole

Comment 1 Vijay Bellur 2016-08-05 11:30:37 UTC
REVIEW: http://review.gluster.org/15100 (posix: honour fsync flags in posix_do_zerofill) posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 2 Vijay Bellur 2016-08-05 16:06:55 UTC
COMMIT: http://review.gluster.org/15100 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit cf51bc699646359be92969024a52c225e7ee55a1
Author: Ravishankar N <ravishankar>
Date:   Fri Aug 5 11:22:18 2016 +0000

    posix: honour fsync flags in posix_do_zerofill
    
    commit 6d994661db96cad43f26d0d1e2fba31dce9a76f5 introduced fallocate +
    FALLOC_FL_ZERO_RANGE to do posix_do_zerofill but did not do an fsync if
    O_SYNC or O_DSYNC fd flags were set. Prashant Pai pointed out performing
    fallocate(2) does not remove the necessity to do fsyncs if durability is
    desired: http://linux-fsdevel.vger.kernel.narkive.com/bDmrAUlh/fallocate-falloc-fl-punch-hole
    
    So fixed it to honour the fd flags.
    
    Change-Id: I27ae90b429185d0af29a5e632c4a8b242075a899
    BUG: 1364449
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/15100
    Reviewed-by: Prashanth Pai <ppai>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Shyamsundar 2017-03-27 18:18:00 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/