]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/FileStore: use fdatasync(2) instead of sync_file_range(2)
authorSage Weil <sage@inktank.com>
Wed, 19 Jun 2013 04:24:16 +0000 (21:24 -0700)
committerSage Weil <sage@inktank.com>
Wed, 19 Jun 2013 04:24:16 +0000 (21:24 -0700)
commitffade3c85dfffa13a16edd9630a52d99eb8a413d
tree6f4d6674d18bfc72faa8c28515c3c2c23458c157
parentc14dd154584eef97075e4a260719b6cbe686d4c7
os/FileStore: use fdatasync(2) instead of sync_file_range(2)

The use of sync_file_range(2) on XFS screws up XFS' delicate ordering
of writeback and range zeroing; see #4976 and this thread:

  http://oss.sgi.com/archives/xfs/2013-06/msg00066.html

Instead, replace all sync_file_range(2) calls with fdatasync(2), which
*does* do ordered writeback and should not leak unzeroed blocks.

Signed-off-by: Sage Weil <sage@inktank.com>
src/os/FileStore.cc