diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2023-11-17 18:20:34 +0100 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2023-11-20 13:02:10 +0100 |
commit | 670eec4953f923b2ee6c00edccd6fbad66bd0641 (patch) | |
tree | 91c39512e4ea4b3dff11f732b23c0e4db091256f /src | |
parent | f66db4bb21efeead140a453f91280bb9471f24a9 (diff) | |
download | justbuild-670eec4953f923b2ee6c00edccd6fbad66bd0641.tar.gz |
Remove O_SYNC from low-level file-writing flags.
The man page for open(2) says the following to the O_SYNC flag: 'O_SYNC
provides synchronized I/O file integrity completion, meaning write operations
will flush data and all associated metadata to the underlying hardware.' This
flag results in a high delay when files are stored in casx, e.g., several
seconds for medium-sized files such as 23 MB. Since just does not care about
persistency, this strong synchronization mechanism is not required and is
deactivated.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/file_system/file_system_manager.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index d905f301..181cba27 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -1149,7 +1149,7 @@ class FileSystemManager { class LowLevel { static constexpr ssize_t kDefaultChunkSize = 1024 * 32; static constexpr int kWriteFlags = - O_WRONLY | O_CREAT | O_TRUNC | O_SYNC; // NOLINT + O_WRONLY | O_CREAT | O_TRUNC; // NOLINT static constexpr int kWritePerms = // 644 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; // NOLINT |