Browse Source

Allow setting of passthrough max-stack-depth (#1542)

pull/1543/head 2.41.0-rc2
trapexit 7 days ago
committed by GitHub
parent
commit
d18c273293
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      libfuse/lib/debug.cpp
  2. 1
      libfuse/lib/fuse_i.h
  3. 4
      libfuse/lib/fuse_lowlevel.cpp

16
libfuse/lib/debug.cpp

@ -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++)
{

1
libfuse/lib/fuse_i.h

@ -54,6 +54,7 @@ struct fuse_notify_req
struct fuse_ll
{
unsigned passthrough_max_stack_depth;
int debug;
int no_remote_posix_lock;
int no_remote_flock;

4
libfuse/lib/fuse_lowlevel.cpp

@ -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;
}
if(inargflags & FUSE_INIT_EXT)
@ -1810,6 +1810,7 @@ static const struct fuse_opt fuse_ll_opts[] =
{ "no_remote_lock", offsetof(struct fuse_ll, no_remote_flock), 1},
{ "no_remote_flock", offsetof(struct fuse_ll, no_remote_flock), 1},
{ "no_remote_posix_lock", offsetof(struct fuse_ll, no_remote_posix_lock), 1},
{ "passthrough-max-stack-depth=%u", offsetof(struct fuse_ll, passthrough_max_stack_depth), 0},
FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_DISCARD),
FUSE_OPT_KEY("-h", KEY_HELP),
FUSE_OPT_KEY("--help", KEY_HELP),
@ -2072,6 +2073,7 @@ fuse_lowlevel_new_common(struct fuse_args *args,
f->conn.max_write = UINT_MAX;
f->conn.max_readahead = UINT_MAX;
f->passthrough_max_stack_depth = 2;
list_init_nreq(&f->notify_list);
f->notify_ctr = 1;
mutex_init(&f->lock);

Loading…
Cancel
Save