[Bugs] [Bug 1361249] New: posix: leverage FALLOC_FL_ZERO_RANGE in zerofill fop
bugzilla at redhat.com
bugzilla at redhat.com
Thu Jul 28 15:27:11 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1361249
Bug ID: 1361249
Summary: posix: leverage FALLOC_FL_ZERO_RANGE in zerofill fop
Product: GlusterFS
Version: mainline
Component: posix
Assignee: bugs at gluster.org
Reporter: ravishankar at redhat.com
CC: bugs at gluster.org
posix_zerofill() implements zerofilling of a given (offset,length) by
doing a writev in a loop followed by an optional fsync on the file.
fallocate(2) has a FALLOC_FL_ZERO_RANGE flag which does away with all
this and provides the same result (from a userspace application point of
view) with a single syscall. This patch attempts the zerofill with the
latter and falls back to the former if it fails.
Tested using a libgfapi based C program on XFS and observed using gdb that
posix_zerofill()'s call to fallocate with FALLOC_FL_ZERO_RANGE was a
success.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list