From 147aae31b1ac57b20868fe9ab553426e2d6c3384 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 17 May 2015 00:26:23 +0200 Subject: [PATCH] Sync extfs device file descriptor. --- ext/device.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/device.cpp b/ext/device.cpp index cfcc6381..55d215ec 100644 --- a/ext/device.cpp +++ b/ext/device.cpp @@ -133,11 +133,13 @@ void Device::Sync() while ( dirty_block || sync_in_transit ) pthread_cond_wait(&sync_thread_cond, &sync_thread_lock); pthread_mutex_unlock(&sync_thread_lock); + fsync(fd); return; } while ( dirty_block ) dirty_block->Sync(); + fsync(fd); } void Device::SyncThread()