]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore : Do not need to call fdatasync if using direct.
authorXiaoxi Chen <xiaoxi.chen@intel.com>
Mon, 27 Apr 2015 08:28:33 +0000 (16:28 +0800)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:40 +0000 (13:39 -0400)
skip ::fdatasync if in direct mode.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
src/os/newstore/NewStore.cc

index b2ffad79bf43b63570d6b44aa769b5c28602e3ec..440f4715a77b41bdb435281bb27982ddbf34d37b 100644 (file)
@@ -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;