From: Sage Weil Date: Fri, 18 Jan 2013 20:14:48 +0000 (-0800) Subject: os/FileStore: only flush inline if write is sufficiently large X-Git-Tag: v0.57~164 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=49726dcf973c38c7313ab78743b45ccc879671ea;p=ceph.git os/FileStore: only flush inline if write is sufficiently large Honor filestore_flush_min in the inline flush case. Backport: bobtail Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index fa11b373882c..fc1f931a8610 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2913,13 +2913,13 @@ int FileStore::_write(coll_t cid, const hobject_t& oid, if (!should_flush || !m_filestore_flusher || !queue_flusher(fd, offset, len)) { - if (m_filestore_sync_flush) + if (should_flush && m_filestore_sync_flush) ::sync_file_range(fd, offset, len, SYNC_FILE_RANGE_WRITE); lfn_close(fd); } #else // no sync_file_range; (maybe) flush inline and close. - if (m_filestore_sync_flush) + if (should_flush && m_filestore_sync_flush) ::fdatasync(fd); lfn_close(fd); #endif