Browse Source

Allow setting of passthrough max_stack_depth

passthrough-depth
Antonio SJ Musumeci 1 month ago
parent
commit
4b580522c1
  1. 16
      libfuse/lib/debug.cpp
  2. 1
      libfuse/lib/fuse_i.h
  3. 3
      libfuse/lib/fuse_lowlevel.cpp
  4. 1
      src/config.hpp

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:" output = fmt::format("fuse_init_out:"
" major={};" " major={};"
" minor={};" " minor={};"
" max_readahead={};"
" max_background={};"
" congestion_threshold={};"
" max_write={};"
" time_gran={};"
" max_pages={};" " max_pages={};"
" map_alignment={};"
" max_stack_depth={};"
" flags=(", " flags=(",
arg_->major, arg_->major,
arg_->minor, 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++) for(uint64_t i = 0; i < (sizeof(flags)*8); i++)
{ {

1
libfuse/lib/fuse_i.h

@ -69,6 +69,7 @@ struct fuse_ll
int broken_splice_nonblock; int broken_splice_nonblock;
uint64_t notify_ctr; uint64_t notify_ctr;
struct fuse_notify_req notify_list; struct fuse_notify_req notify_list;
int passthrough_max_stack_depth;
}; };
struct fuse_cmd struct fuse_cmd

3
libfuse/lib/fuse_lowlevel.cpp

@ -1288,7 +1288,7 @@ do_init(fuse_req_t req,
if(f->conn.want & FUSE_CAP_PASSTHROUGH) if(f->conn.want & FUSE_CAP_PASSTHROUGH)
{ {
outargflags |= FUSE_PASSTHROUGH; outargflags |= FUSE_PASSTHROUGH;
outarg.max_stack_depth = 2;
outarg.max_stack_depth = (f->passthrough_max_stack_depth + 1);
} }
if(inargflags & FUSE_INIT_EXT) if(inargflags & FUSE_INIT_EXT)
@ -1800,6 +1800,7 @@ enum {
static const struct fuse_opt fuse_ll_opts[] = 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 }, { "debug", offsetof(struct fuse_ll, debug), 1 },
{ "-d", offsetof(struct fuse_ll, debug), 1 }, { "-d", offsetof(struct fuse_ll, debug), 1 },
{ "max_readahead=%u", offsetof(struct fuse_ll, conn.max_readahead), 0 }, { "max_readahead=%u", offsetof(struct fuse_ll, conn.max_readahead), 0 },

1
src/config.hpp

@ -124,6 +124,7 @@ public:
NFSOpenHack nfsopenhack; NFSOpenHack nfsopenhack;
ConfigBOOL nullrw; ConfigBOOL nullrw;
Passthrough passthrough = Passthrough::ENUM::OFF; Passthrough passthrough = Passthrough::ENUM::OFF;
ConfigINT passthrough_depth = 1;
ConfigBOOL parallel_direct_writes; ConfigBOOL parallel_direct_writes;
ConfigGetPid pid; ConfigGetPid pid;
ConfigBOOL posix_acl; ConfigBOOL posix_acl;

Loading…
Cancel
Save