diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/system/direct_io.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/direct_io.h')
-rw-r--r-- | util/system/direct_io.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/system/direct_io.h b/util/system/direct_io.h index 6a3325a960..b228af2105 100644 --- a/util/system/direct_io.h +++ b/util/system/direct_io.h @@ -1,8 +1,8 @@ #pragma once -#include "align.h" - -#include "file.h" +#include "align.h" + +#include "file.h" #include <util/generic/buffer.h> // Supports Linux Direct-IO: @@ -13,7 +13,7 @@ class TDirectIOBufferedFile { public: TDirectIOBufferedFile(const TString& path, EOpenMode oMode, size_t buflen = 1 << 17); ~TDirectIOBufferedFile(); - + void FlushData(); void Finish(); size_t Read(void* buffer, size_t byteCount); @@ -49,7 +49,7 @@ private: inline bool IsAligned(i64 value) { return Alignment ? value == AlignDown<i64>(value, Alignment) : true; } - + inline bool IsAligned(const void* value) { return Alignment ? value == AlignDown(value, Alignment) : true; } @@ -60,7 +60,7 @@ private: void WriteToBuffer(const void* buf, size_t len, ui64 position); void SetDirectIO(bool value); -private: +private: TFile File; size_t Alignment; size_t BufLen; |