mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-22 16:06:27 -05:00
Allow setting of passthrough max_stack_depth
This commit is contained in:
parent
25b0bc72df
commit
4b580522c1
4 changed files with 20 additions and 3 deletions
|
|
@ -861,11 +861,25 @@ fuse_syslog_fuse_init_out(const struct fuse_init_out *arg_)
|
|||
output = fmt::format("fuse_init_out:"
|
||||
" major={};"
|
||||
" minor={};"
|
||||
" max_readahead={};"
|
||||
" max_background={};"
|
||||
" congestion_threshold={};"
|
||||
" max_write={};"
|
||||
" time_gran={};"
|
||||
" max_pages={};"
|
||||
" map_alignment={};"
|
||||
" max_stack_depth={};"
|
||||
" flags=(",
|
||||
arg_->major,
|
||||
arg_->minor,
|
||||
arg_->max_pages);
|
||||
arg_->max_readahead,
|
||||
arg_->max_background,
|
||||
arg_->congestion_threshold,
|
||||
arg_->max_write,
|
||||
arg_->time_gran,
|
||||
arg_->max_pages,
|
||||
arg_->map_alignment,
|
||||
arg_->max_stack_depth);
|
||||
|
||||
for(uint64_t i = 0; i < (sizeof(flags)*8); i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ struct fuse_ll
|
|||
int broken_splice_nonblock;
|
||||
uint64_t notify_ctr;
|
||||
struct fuse_notify_req notify_list;
|
||||
int passthrough_max_stack_depth;
|
||||
};
|
||||
|
||||
struct fuse_cmd
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,7 @@ do_init(fuse_req_t req,
|
|||
struct fuse_in_header *hdr_)
|
||||
{
|
||||
struct fuse_init_out outarg = {0};
|
||||
struct fuse_init_in *arg = (struct fuse_init_in *) &hdr_[1];
|
||||
struct fuse_init_in *arg = (struct fuse_init_in*)&hdr_[1];
|
||||
struct fuse_ll *f = req->f;
|
||||
size_t bufsize = fuse_chan_bufsize(req->ch);
|
||||
uint64_t inargflags;
|
||||
|
|
@ -1288,7 +1288,7 @@ do_init(fuse_req_t req,
|
|||
if(f->conn.want & FUSE_CAP_PASSTHROUGH)
|
||||
{
|
||||
outargflags |= FUSE_PASSTHROUGH;
|
||||
outarg.max_stack_depth = 2;
|
||||
outarg.max_stack_depth = (f->passthrough_max_stack_depth + 1);
|
||||
}
|
||||
|
||||
if(inargflags & FUSE_INIT_EXT)
|
||||
|
|
@ -1800,6 +1800,7 @@ enum {
|
|||
|
||||
static const struct fuse_opt fuse_ll_opts[] =
|
||||
{
|
||||
{ "passthrough-max-stack-depth=%u", offsetof(struct fuse_ll, passthrough_max_stack_depth), 0 },
|
||||
{ "debug", offsetof(struct fuse_ll, debug), 1 },
|
||||
{ "-d", offsetof(struct fuse_ll, debug), 1 },
|
||||
{ "max_readahead=%u", offsetof(struct fuse_ll, conn.max_readahead), 0 },
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ public:
|
|||
NFSOpenHack nfsopenhack;
|
||||
ConfigBOOL nullrw;
|
||||
Passthrough passthrough = Passthrough::ENUM::OFF;
|
||||
ConfigINT passthrough_depth = 1;
|
||||
ConfigBOOL parallel_direct_writes;
|
||||
ConfigGetPid pid;
|
||||
ConfigBOOL posix_acl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue