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()