mirror of
https://github.com/Zygo/bees.git
synced 2025-06-17 10:06:16 +02:00
bees: use readahead instead of posix_fadvise
Other btrfs utils use readahead() not posix_fadvise(). There does not appear to be a performance or correctness difference between the three (none, posix_fadvise, or readahead()). Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -313,7 +313,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
|
||||
}
|
||||
|
||||
// OK we need to read extent now
|
||||
posix_fadvise(bfr.fd(), bfr.begin(), bfr.size(), POSIX_FADV_WILLNEED);
|
||||
readahead(bfr.fd(), bfr.begin(), bfr.size());
|
||||
|
||||
map<off_t, pair<BeesHash, BeesAddress>> insert_map;
|
||||
set<off_t> noinsert_set;
|
||||
|
Reference in New Issue
Block a user