Reverted change in 1.16.0 that made direct_io the default.

Fixes #117
master
Martin Pärtel 3 months ago
parent 53e48284d7
commit f1518cd084
  1. 6
      ChangeLog
  2. 13
      src/bindfs.1
  3. 7
      src/bindfs.c

@ -1,3 +1,9 @@
2022-07-12 Martin Pärtel <martin dot partel at gmail dot com>
* Reverted change in 1.16.0 that made direct_io the default.
It turned out to be more problematic than not having it.
(issue #117, thanks @DUOLabs333 and @Misterio77)
2022-06-24 Martin Pärtel <martin dot partel at gmail dot com>
* Added --map-{passwd,group}-rev

@ -409,13 +409,18 @@ Run bindfs in multithreaded mode. While bindfs is designed to be
otherwise thread-safe, there is currently a race condition that may pose
a security risk for some use cases. See \fB\%BUGS\fP below.
.TP
.B \-\-direct\-io, \-o direct\-io
Forwards each read/write operation 1:1 to the underlying FS,
disabling batching and caching by the kernel. Some applications may
require this, however it may be incompatible with other applications,
as currently it has issues with \fBmmap\fP(2) calls, at least.
.TP
.B \-\-no\-direct\-io, \-o no\-direct\-io
By default, each read/write operation is forwarded 1:1 to the underlying FS,
disabling batching and caching by the kernel. Specify this option for default
FUSE behaviour, which may be more performant with some applications but
incompatible with others.
This option is provided in case the default changes in the future.
.TP
.B \-\-forward\-odirect=\fIalignment\fP, \-o forward\-odirect=\fIalignment\fP

@ -1801,6 +1801,7 @@ enum OptionKey {
OPTKEY_HIDE_HARD_LINKS,
OPTKEY_RESOLVE_SYMLINKS,
OPTKEY_BLOCK_DEVICES_AS_FILES,
OPTKEY_DIRECT_IO,
OPTKEY_NO_DIRECT_IO
};
@ -1910,6 +1911,9 @@ static int process_option(void *data, const char *arg, int key,
settings.block_devices_as_files = 1;
return 0;
#ifdef __linux__
case OPTKEY_DIRECT_IO:
settings.direct_io = true;
return 0;
case OPTKEY_NO_DIRECT_IO:
settings.direct_io = false;
return 0;
@ -2408,6 +2412,7 @@ int main(int argc, char *argv[])
OPT2("--delete-deny", "delete-deny", OPTKEY_DELETE_DENY),
OPT2("--rename-deny", "rename-deny", OPTKEY_RENAME_DENY),
#ifdef __linux__
OPT2("--direct-io", "direct-io", OPTKEY_DIRECT_IO),
OPT2("--no-direct-io", "no-direct-io", OPTKEY_NO_DIRECT_IO),
#endif
@ -2477,7 +2482,7 @@ int main(int argc, char *argv[])
#ifdef __linux__
settings.forward_odirect = 0;
settings.odirect_alignment = 0;
settings.direct_io = true;
settings.direct_io = false;
#endif
atexit(&atexit_func);

Loading…
Cancel
Save