From d345ea2b78bbd71fbeb085fb25e56ece6dcb800f Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Thu, 10 Nov 2022 10:09:47 -0500 Subject: [PATCH] readahead: use emulation It seems that readahead() does not work on btrfs, or at least it has no discernable effect. Enable the workaround instead. Signed-off-by: Zygo Blaxell --- src/bees.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bees.cc b/src/bees.cc index ba3fc5b..768b333 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -220,7 +220,7 @@ bees_readahead(int const fd, off_t offset, size_t size) Timer readahead_timer; BEESNOTE("readahead " << name_fd(fd) << " offset " << to_hex(offset) << " len " << pretty(size)); BEESTOOLONG("readahead " << name_fd(fd) << " offset " << to_hex(offset) << " len " << pretty(size)); -#if 1 +#if 0 // In the kernel, readahead() is identical to posix_fadvise(..., POSIX_FADV_DONTNEED) DIE_IF_NON_ZERO(readahead(fd, offset, size)); #else