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:
Antonio SJ Musumeci 2019-05-30 18:59:18 -04:00
parent 24af276542
commit 7cbd88ac81
14 changed files with 345 additions and 210 deletions

View file

@ -233,6 +233,18 @@ namespace l
attrvalue_ = (string)cache_files_;
}
static
void
getxattr_controlfile(const uint16_t &uint16_,
string &attrvalue_)
{
std::ostringstream os;
os << uint16_;
attrvalue_ = os.str();
}
static
void
getxattr_controlfile_policies(const Config &config,
@ -358,6 +370,8 @@ namespace l
l::getxattr_controlfile_bool(config.posix_acl,attrvalue);
else if(attr[2] == "async_read")
l::getxattr_controlfile_bool(config.async_read,attrvalue);
else if(attr[2] == "fuse_msg_size")
l::getxattr_controlfile(config.fuse_msg_size,attrvalue);
break;
case 4: