diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-08-05 11:22:18 +0000 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-08-05 22:40:25 -0700 |
commit | 2c748b731f233588b97d375ce92a5ae56612d764 (patch) | |
tree | 0b695ff74a961d6c84b848d67c55f916c9549a6e /libglusterfs | |
parent | 15d963d6ce416c29fa7eea225d20d979afdf315c (diff) |
posix: honour fsync flags in posix_do_zerofill
Backport of http://review.gluster.org/#/c/15100/
commit fe1054110ac54750ca0333a727d83b14a98e165e 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: 1364497
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit cf51bc699646359be92969024a52c225e7ee55a1)
Reviewed-on: http://review.gluster.org/15103
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs')
0 files changed, 0 insertions, 0 deletions