diff options
Diffstat (limited to 'http/http_body.hpp')
-rw-r--r-- | http/http_body.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/http/http_body.hpp b/http/http_body.hpp index f2ec53fec2..46070cc60f 100644 --- a/http/http_body.hpp +++ b/http/http_body.hpp @@ -3,6 +3,7 @@ #include "logging.hpp" #include "utility.hpp" +#include <fcntl.h> #include <unistd.h> #include <boost/beast/core/buffers_range.hpp> @@ -139,6 +140,13 @@ class HttpBody::value_type { BMCWEB_LOG_WARNING("Failed to read file size on {}", path); } + + int fadvise = posix_fadvise(fileHandle.native_handle(), 0, 0, + POSIX_FADV_SEQUENTIAL); + if (fadvise != 0) + { + BMCWEB_LOG_WARNING("Fasvise returned {} ignoring", fadvise); + } ec = {}; } |