fix: read metadata in O_DIRECT if configured and supported (#11594)

reduce the page-cache pressure completely by moving
the entire read-phase of our operations to O_DIRECT,
primarily this is going to be very useful for chatty
metadata operations such as listing, scanner, ilm, healing
like operations to avoid filling up the page-cache upon
repeated runs.
This commit is contained in:
Harshavardhana
2021-02-22 01:36:17 -08:00
committed by GitHub
parent 48b212dd8e
commit 8778828a03
2 changed files with 5 additions and 36 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ func osErrToFileErr(err error) error {
if osIsPermission(err) {
return errFileAccessDenied
}
if isSysErrNotDir(err) {
if isSysErrNotDir(err) || isSysErrIsDir(err) {
return errFileNotFound
}
if isSysErrPathNotFound(err) {