mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd::db: Replace fadvises with fs::evict() wrapping.
This commit is contained in:
parent
d9812f3e86
commit
c2984e9473
1 changed files with 3 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue