diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-05 19:35:12 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-05 19:35:12 +0100 |
commit | 59ed235c857692c427777465ad55f4157e0f44da (patch) | |
tree | 2d2a02f7adbe9af5e724e6f315b437d2f3eeec93 /Kernel/FileSystem/VirtualFileSystem.h | |
parent | 3de3daf765670365b0466128307accd9b395d307 (diff) | |
download | serenity-59ed235c857692c427777465ad55f4157e0f44da.zip |
Kernel: Implement O_DIRECT open() flag to bypass disk caches
Files opened with O_DIRECT will now bypass the disk cache in read/write
operations (though metadata operations will still hit the disk cache.)
This will allow us to test actual disk performance instead of testing
disk *cache* performance, if that's what we want. :^)
There's room for improvment here, we're very aggressively flushing any
dirty cache entries for the specific block before reading/writing that
block. This is done by walking the entire cache, which may be slow.
Diffstat (limited to 'Kernel/FileSystem/VirtualFileSystem.h')
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h index 588e1d85f5..cd1b919012 100644 --- a/Kernel/FileSystem/VirtualFileSystem.h +++ b/Kernel/FileSystem/VirtualFileSystem.h @@ -24,6 +24,7 @@ #define O_DIRECTORY 00200000 #define O_NOFOLLOW 00400000 #define O_CLOEXEC 02000000 +#define O_DIRECT 04000000 #define O_NOFOLLOW_NOERROR 0x4000000 class Custody; |