Skip to content

Commit 0131d11

Browse files
henry.hjbergwolf
authored andcommitted
bugfix: fix BIG_WRITES doesn't work
if FUSE module doesn't support MAX_PAGES, BIG_WRITES doesn't work(kernel only submit 4K write requests). We should set max_write if BIG_WRITES enabled. Signed-off-by: henry.hj <[email protected]>
1 parent bb1528b commit 0131d11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api/server/sync_io.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,9 @@ impl<F: FileSystem + Sync> Server<F> {
633633
time_gran: 1, // nanoseconds
634634
..Default::default()
635635
};
636+
if enabled.contains(FsOptions::BIG_WRITES) {
637+
out.max_write = MAX_REQ_PAGES as u32 * pagesize() as u32;
638+
}
636639
if enabled.contains(FsOptions::MAX_PAGES) {
637640
out.max_pages = MAX_REQ_PAGES;
638641
out.max_write = MAX_REQ_PAGES as u32 * pagesize() as u32; // 1MB

0 commit comments

Comments
 (0)