0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-17 17:38:22 +02:00

ircd::db: Replace fadvises with fs::evict() wrapping.

This commit is contained in:
Jason Volk 2019-05-03 05:41:52 -07:00
parent d9812f3e86
commit c2984e9473

View file

@ -1622,10 +1622,7 @@ noexcept try
if(opts.direct)
return Status::OK();
#if defined(HAVE_POSIX_FADVISE) && defined(FADV_DONTNEED)
syscall(::posix_fadvise, fd, offset, length, FADV_DONTNEED);
#endif
fs::evict(fd, length, offset);
return Status::OK();
}
catch(const std::system_error &e)
@ -3082,10 +3079,7 @@ noexcept try
if(opts.direct)
return Status::OK();
#if defined(HAVE_POSIX_FADVISE) && defined(FADV_DONTNEED)
syscall(::posix_fadvise, fd, offset, length, FADV_DONTNEED);
#endif
fs::evict(fd, length, offset);
return Status::OK();
}
catch(const std::system_error &e)
@ -3356,10 +3350,7 @@ noexcept
if(opts.direct)
return Status::OK();
#if defined(HAVE_POSIX_FADVISE) && defined(FADV_DONTNEED)
syscall(::posix_fadvise, fd, offset, length, FADV_DONTNEED);
#endif
fs::evict(fd, length, offset);
return Status::OK();
}