Skip to content

Commit c64a2b6

Browse files
committed
Ensure the max read request to FUSE is 1MiB and not more.
1 parent ca98726 commit c64a2b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (c *Connection) Init() error {
185185

186186
// kernel 4.20 increases the max from 32 -> 256
187187
initOp.Flags |= fusekernel.InitMaxPages
188-
initOp.MaxPages = 256
188+
initOp.MaxPages = uint16((1 << 20) / os.Getpagesize())
189189

190190
// Enable writeback caching if the user hasn't asked us not to.
191191
if !c.cfg.DisableWritebackCaching {

0 commit comments

Comments
 (0)