mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
allow setting of 'max_pages' (via 'fuse_msg_size')
Linux 4.20 and above allow setting the number of pages per FUSE message upto 256 (4K * 256 = 1MiB). This can greatly increase read and write speeds depending on the workload.
This commit is contained in:
parent
24af276542
commit
7cbd88ac81
14 changed files with 345 additions and 210 deletions
|
|
@ -60,6 +60,22 @@ namespace l
|
|||
|
||||
*want_ = false;
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
want_if_capable_max_pages(fuse_conn_info *conn_,
|
||||
Config &c_)
|
||||
{
|
||||
if(l::capable(conn_,FUSE_CAP_MAX_PAGES))
|
||||
{
|
||||
l::want(conn_,FUSE_CAP_MAX_PAGES);
|
||||
conn_->max_pages = c_.fuse_msg_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
c_.fuse_msg_size = FUSE_DEFAULT_MAX_PAGES_PER_REQ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace FUSE
|
||||
|
|
@ -80,6 +96,7 @@ namespace FUSE
|
|||
l::want_if_capable(conn_,FUSE_CAP_IOCTL_DIR);
|
||||
l::want_if_capable(conn_,FUSE_CAP_PARALLEL_DIROPS);
|
||||
l::want_if_capable(conn_,FUSE_CAP_POSIX_ACL,&c.posix_acl);
|
||||
l::want_if_capable_max_pages(conn_,c);
|
||||
|
||||
return &c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue