diff options
author | Cthulhu <cthulhu@yandex-team.ru> | 2022-02-10 16:47:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:44 +0300 |
commit | bcb3e9d0eb2a8188a6a9fe0907a8949ce4881a4e (patch) | |
tree | 09f7d6526ac5428ea224cd3cf7bd79809d8e6a07 /util/system/file.cpp | |
parent | 7b82c914c2f468dd50a208ff6a00d38ee7f0018f (diff) | |
download | ydb-bcb3e9d0eb2a8188a6a9fe0907a8949ce4881a4e.tar.gz |
Restoring authorship annotation for Cthulhu <cthulhu@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/file.cpp')
-rw-r--r-- | util/system/file.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/system/file.cpp b/util/system/file.cpp index 4a261d020c..6a140dc446 100644 --- a/util/system/file.cpp +++ b/util/system/file.cpp @@ -184,25 +184,25 @@ TFileHandle::TFileHandle(const TString& fName, EOpenMode oMode) noexcept { } */ #if defined(_freebsd_) - if (oMode & (Direct | DirectAligned)) { - fcMode |= O_DIRECT; - } - - if (oMode & Sync) { - fcMode |= O_SYNC; - } + if (oMode & (Direct | DirectAligned)) { + fcMode |= O_DIRECT; + } + + if (oMode & Sync) { + fcMode |= O_SYNC; + } #elif defined(_linux_) - if (oMode & DirectAligned) { + if (oMode & DirectAligned) { /* * O_DIRECT in Linux requires aligning request size and buffer address * to size of hardware sector (see hw_sector_size or ioctl BLKSSZGET). * Usually 512 bytes, but modern hardware works better with 4096 bytes. */ fcMode |= O_DIRECT; - } - if (oMode & Sync) { - fcMode |= O_SYNC; - } + } + if (oMode & Sync) { + fcMode |= O_SYNC; + } #endif #if defined(_linux_) |