Skip to content

Enable Configurable Maximum Buffer Size for FUSE Messages#194

Open
abhishek10004 wants to merge 1 commit into
jacobsa:masterfrom
abhishek10004:abhishek/dynamic_buffer_size
Open

Enable Configurable Maximum Buffer Size for FUSE Messages#194
abhishek10004 wants to merge 1 commit into
jacobsa:masterfrom
abhishek10004:abhishek/dynamic_buffer_size

Conversation

@abhishek10004
Copy link
Copy Markdown

This PR removes the hardcoded 1 MiB limit for FUSE message buffers in jacobsa/fuse and makes it configurable via MountConfig. This is necessary to support larger kernel requests (e.g., 16 MiB) without triggering buffer overflows that result in 0-byte reads and premature EOFs. (Also, we're still keep the minimum buffer size value to 1MiB which is still the default value)

Comment thread connection.go
if cfg.MaxMessageSize > 0 {
maxPayload = max(maxPayload, int(cfg.MaxMessageSize))
}
c.inMessageSize = maxPayload + buffer.GetPageSize()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add this pageSize() inside in_message.go constructor? that way we can avoid subtracting for maxWrite.

you can also rename this parameter to maxPayload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants