summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/http_body.hpp8
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 = {};
}