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

ircd::db: Advise sequential access for sequential file type.

This commit is contained in:
Jason Volk 2019-05-03 06:00:00 -07:00
parent c114191251
commit fbb88b87c1

View file

@ -8,6 +8,7 @@
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
#include <RB_INC_FCNTL_H
#include "db.h"
//
@ -2799,6 +2800,11 @@ try
name
};
#endif
#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_SEQUENTIAL)
if(!opts.direct)
syscall(::posix_fadvise, fd, offset, off_t(0), POSIX_FADV_SEQUENTIAL);
#endif
}
catch(const std::system_error &e)
{