libfuse/include
Joanne Koong 0e0f43b79b Reallocate fuse_session buffer transparently for extended max writes
A previous PR supported extended max writes (eg write requests larger than 1 MB)
by initializing the fuse session buffer size to use the max_pages_limit set in
/proc/sys/fs/fuse. However, this is a huge problem for machines where multiple
fuse servers may be running but only one server needs large writes. In this case,
a lot of memory will be wasted and will lead to OOM issues.

This PR does a reallocation of the session buffer transparently if the server set
 "se->conn.max_write" to a value larger than 1 MiB. This is only for buffers that
are "owned" by libfuse - if the server wishes to provide its own allocated buffer
for receiving/processing requests, then it should ensure that buffer is allocated
to the proper size from the start.

Local testing showed:
echo 65535 | sudo tee /proc/sys/fs/fuse/max_pages_limit
dd if=/dev/urandom of=hello_file bs=6M count=2

write requests:
write request size is 5242880
write request size is 1048576
write request size is 5242880
write request size is 1048576
2024-11-21 19:18:03 +01:00
..
cuse_lowlevel.h Remove leading _ on header guards to comply with reserved identifier requirements (#29) 2016-04-23 09:54:18 -07:00
fuse_common.h Reallocate fuse_session buffer transparently for extended max writes 2024-11-21 19:18:03 +01:00
fuse_kernel.h synchronize fuse_kernel.h with linux-6.10 2024-08-01 16:04:57 +02:00
fuse_log.h Add syslog and fatal signal handler feature 2024-07-14 14:28:44 +02:00
fuse_lowlevel.h getattr: Make use of FUSE_GETATTR_FH in lowlevel examples 2024-09-12 18:21:25 +02:00
fuse_mount_compat.h Add MS_NOSYMFOLLOW compat definition 2024-07-29 22:22:44 +02:00
fuse_opt.h Remove leading _ on header guards to comply with reserved identifier requirements (#29) 2016-04-23 09:54:18 -07:00
fuse.h Annotate ABI sensitivness for some data structures 2024-07-03 13:10:46 +02:00
meson.build Introduce callback for logging 2019-09-04 15:59:18 +01:00