From 5c25310803d116ffa14b101595fea2cd927e4f15 Mon Sep 17 00:00:00 2001 From: Liryna Date: Mon, 12 Feb 2024 19:43:43 -0500 Subject: [PATCH] FUSE - Add option '-b' to enable Dokan ipc batching option Fixes #1202 --- dokan_fuse/include/dokanfuse.h | 1 + dokan_fuse/src/dokanfuse.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/dokan_fuse/include/dokanfuse.h b/dokan_fuse/include/dokanfuse.h index a77a5586..a9035ba4 100644 --- a/dokan_fuse/include/dokanfuse.h +++ b/dokan_fuse/include/dokanfuse.h @@ -31,6 +31,7 @@ struct fuse_config int debug; int mountManager; int readonly; + int allowIpcBatching; int setsignals; unsigned int timeoutInSec; int removableDrive; diff --git a/dokan_fuse/src/dokanfuse.cpp b/dokan_fuse/src/dokanfuse.cpp index 7e4cb29f..8f6e5bb4 100644 --- a/dokan_fuse/src/dokanfuse.cpp +++ b/dokan_fuse/src/dokanfuse.cpp @@ -540,6 +540,10 @@ int do_fuse_loop(struct fuse *fs, bool mt) { if (fs->conf.readonly) dokanOptions->Options |= DOKAN_OPTION_WRITE_PROTECT; + // Allow IPC batching + if (fs->conf.allowIpcBatching) + dokanOptions->Options |= DOKAN_OPTION_ALLOW_IPC_BATCHING; + // Load Dokan DLL if (!fs->ch->init()) { free(dokanOptions); @@ -621,6 +625,7 @@ static const struct fuse_opt fuse_lib_opts[] = { FUSE_LIB_OPT("-n", networkDrive, 1), FUSE_LIB_OPT("-m", mountManager, 1), FUSE_LIB_OPT("-p", removableDrive, 1), + FUSE_LIB_OPT("-b", allowIpcBatching, 1), FUSE_OPT_END}; static void fuse_lib_help(void) { @@ -640,6 +645,7 @@ static void fuse_lib_help(void) { " -n use network drive\n" " -m use mount manager\n" " -p use removable drive\n" + " -b enable ipc batching\n" "\n"); }