make buffer size match kernel max transfer size
authorCarlos Maiolino <cmaiolino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Thu, 20 Apr 2017 12:53:01 +0000 (14:53 +0200)
committerNikolaus Rath <Nikolaus@rath.org>
Thu, 20 Apr 2017 16:22:30 +0000 (09:22 -0700)
commit4f8f034a8969a48f210bf00be78a67cfb6964c72
tree303e697563720bd4001bf18c8a086e5e07793677
parentbf76304abd936889f37f9613c199b6f147ba6700
make buffer size match kernel max transfer size

Currently libfuse has a hardcoded buffer limit to 128kib, while fuse
kernel module has a limit up to 32 pages.

This patch changes buffer limit to match the current page size, instead
of assuming 4096 bytes pages, enabling architectures with bigger pages
to use larger buffers, improving performance.

Also, add a new macro (HEADER_SIZE) to specify the space needed to
accommodate the header, making it easier to understand why those extra
4096 bytes are needed

Signed-off-by: Carlos Maiolino <cmaiolino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
lib/fuse_lowlevel.c