mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-19 16:16:48 +00:00
Add FUSE request_timeout
Not yet hooked up to config parser to set as need to evaluate usage.
This commit is contained in:
committed by
trapexit
parent
b581c5d5e7
commit
f2c8e5d9eb
@@ -46,6 +46,8 @@ public:
|
||||
int process_thread_count = -1;
|
||||
int process_thread_queue_depth = 2;
|
||||
std::string pin_threads = "false";
|
||||
|
||||
u16 request_timeout = 0;
|
||||
};
|
||||
|
||||
extern fuse_cfg_t fuse_cfg;
|
||||
|
||||
@@ -1212,6 +1212,7 @@ fuse_syslog_fuse_init_out(const struct fuse_init_out *arg_)
|
||||
" max_pages={};"
|
||||
" map_alignment={};"
|
||||
" max_stack_depth={};"
|
||||
" request_timeout={};"
|
||||
" flags=(",
|
||||
arg_->major,
|
||||
arg_->minor,
|
||||
@@ -1222,7 +1223,8 @@ fuse_syslog_fuse_init_out(const struct fuse_init_out *arg_)
|
||||
arg_->time_gran,
|
||||
arg_->max_pages,
|
||||
arg_->map_alignment,
|
||||
arg_->max_stack_depth);
|
||||
arg_->max_stack_depth,
|
||||
arg_->request_timeout);
|
||||
|
||||
for(uint64_t i = 0; i < (sizeof(flags)*8); i++)
|
||||
{
|
||||
@@ -1268,6 +1270,7 @@ fuse_debug_init_out(const uint64_t unique_,
|
||||
" time_gran={}"
|
||||
" max_pages={}"
|
||||
" map_alignment={}"
|
||||
" request_timeout={}"
|
||||
"\n",
|
||||
_timestamp_ns(),
|
||||
unique_,
|
||||
@@ -1282,7 +1285,8 @@ fuse_debug_init_out(const uint64_t unique_,
|
||||
arg_->max_write,
|
||||
arg_->time_gran,
|
||||
arg_->max_pages,
|
||||
arg_->map_alignment);
|
||||
arg_->map_alignment,
|
||||
arg_->request_timeout);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -1255,6 +1255,12 @@ do_init(fuse_req_t *req,
|
||||
outarg.max_stack_depth = fuse_cfg.passthrough_max_stack_depth;
|
||||
}
|
||||
|
||||
if((inargflags & FUSE_REQUEST_TIMEOUT) && fuse_cfg.request_timeout)
|
||||
{
|
||||
outargflags |= FUSE_REQUEST_TIMEOUT;
|
||||
outarg.request_timeout = fuse_cfg.request_timeout;
|
||||
}
|
||||
|
||||
if(inargflags & FUSE_INIT_EXT)
|
||||
{
|
||||
outargflags |= FUSE_INIT_EXT;
|
||||
|
||||
Reference in New Issue
Block a user