mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-22 07:56:32 -05:00
fadvise cleanup
This commit is contained in:
parent
e3e764ecae
commit
1a1fa06aa3
4 changed files with 46 additions and 4 deletions
|
|
@ -21,3 +21,30 @@
|
|||
#else
|
||||
# include "fs_base_fadvise_unsupported.icpp"
|
||||
#endif
|
||||
|
||||
namespace fs
|
||||
{
|
||||
int
|
||||
fadvise_dontneed(const int fd,
|
||||
const off_t offset,
|
||||
const off_t len)
|
||||
{
|
||||
return fs::fadvise(fd,offset,len,POSIX_FADV_DONTNEED);
|
||||
}
|
||||
|
||||
int
|
||||
fadvise_willneed(const int fd,
|
||||
const off_t offset,
|
||||
const off_t len)
|
||||
{
|
||||
return fs::fadvise(fd,offset,len,POSIX_FADV_WILLNEED);
|
||||
}
|
||||
|
||||
int
|
||||
fadvise_sequential(const int fd,
|
||||
const off_t offset,
|
||||
const off_t len)
|
||||
{
|
||||
return fs::fadvise(fd,offset,len,POSIX_FADV_SEQUENTIAL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue