From: Xiaoxi Chen Date: Mon, 27 Apr 2015 08:28:33 +0000 (+0800) Subject: os/newstore : Do not need to call fdatasync if using direct. X-Git-Tag: v9.1.0~242^2~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=117330045f722a84f4e7c775dc656b8dd41377b2;p=ceph.git os/newstore : Do not need to call fdatasync if using direct. skip ::fdatasync if in direct mode. Signed-off-by: Xiaoxi Chen --- diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index b2ffad79bf43..440f4715a77b 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -2496,7 +2496,8 @@ int NewStore::_do_wal_transaction(wal_transaction_t& wt, << cpp_strerror(r) << dendl; return r; } - sync_fds.push_back(fd); + if (!(flags & O_DIRECT)) + sync_fds.push_back(fd); } } break;