From 655912e989766939db61b10ae76bf8f0c5c733e7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Jan 2016 22:13:07 -0500 Subject: [PATCH] os/bluestore/BlockDevice: initiate bufferd writes at aio_write time Signed-off-by: Sage Weil --- src/os/bluestore/BlockDevice.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/os/bluestore/BlockDevice.cc b/src/os/bluestore/BlockDevice.cc index a4975c1450ba9..0dbe095fb71da 100644 --- a/src/os/bluestore/BlockDevice.cc +++ b/src/os/bluestore/BlockDevice.cc @@ -404,6 +404,10 @@ int BlockDevice::aio_write( derr << __func__ << " pwritev error: " << cpp_strerror(r) << dendl; return r; } + if (buffered) { + // initiate IO (but do not wait) + ::sync_file_range(fd_buffered, off, len, SYNC_FILE_RANGE_WRITE); + } } return 0; } -- 2.39.5