Implement fsync() and fdatasync() syscalls for flushing open files

This commit is contained in:
Sebastian Messmer 2016-06-07 18:36:59 -07:00
parent be31d78349
commit 9bb2e2e89a
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ Fixed Bugs:
Improvements: Improvements:
* When mounting an old file system, CryFS will ask before migrating it to the newest version. * When mounting an old file system, CryFS will ask before migrating it to the newest version.
* Operating system tools like the mount command or /proc/self/mountinfo report correct file system type and also report the base directory. * Operating system tools like the mount command or /proc/self/mountinfo report correct file system type and also report the base directory.
* Reacts correctly to fsync() and fdatasync() syscalls by flushing the corresponding data to the disk.
Version 0.9.4 Version 0.9.4
--------------- ---------------

View File

@ -55,12 +55,12 @@ void CryOpenFile::write(const void *buf, size_t count, off_t offset) {
void CryOpenFile::fsync() { void CryOpenFile::fsync() {
_device->callFsActionCallbacks(); _device->callFsActionCallbacks();
//throw FuseErrnoException(ENOTSUP); _fileBlob->flush();
} }
void CryOpenFile::fdatasync() { void CryOpenFile::fdatasync() {
_device->callFsActionCallbacks(); _device->callFsActionCallbacks();
//throw FuseErrnoException(ENOTSUP); _fileBlob->flush();
} }
} }