Skip to content

Commit

Permalink
FUSE - Add option '-b' to enable Dokan ipc batching option
Browse files Browse the repository at this point in the history
Fixes #1202
  • Loading branch information
Liryna committed Feb 13, 2024
1 parent 415ac36 commit 5c25310
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions dokan_fuse/include/dokanfuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct fuse_config
int debug;
int mountManager;
int readonly;
int allowIpcBatching;
int setsignals;
unsigned int timeoutInSec;
int removableDrive;
Expand Down
6 changes: 6 additions & 0 deletions dokan_fuse/src/dokanfuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand All @@ -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");
}

Expand Down

0 comments on commit 5c25310

Please sign in to comment.