patch: faster preload with BufReader

1. seek avoided with self maintained offset
2. BufReader to read faster

Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
ClSlaid
2023-10-28 22:33:51 +08:00
parent 7a802726fb
commit 4cd8d8a4a5
3 changed files with 61 additions and 26 deletions

View File

@@ -47,7 +47,7 @@ use super::LDAP_EPOCH_DELTA;
const READ_RETRY: i32 = 3;
/// block size for fuse, align to our asynchronic request size over FileContentsRequest.
const BLOCK_SIZE: u32 = 4 * 1024 * 1024;
pub const BLOCK_SIZE: u32 = 4 * 1024 * 1024;
/// read only permission
const PERM_READ: u16 = 0o444;