diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 9 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 2 |
2 files changed, 10 insertions, 1 deletions
@@ -3145,7 +3145,9 @@ static void fuse_lib_create(fuse_req_t req, fuse_ino_t parent, fi->direct_io = 1; if (f->conf.kernel_cache) fi->keep_cache = 1; - + if (fi->direct_io && + f->conf.parallel_direct_writes) + fi->parallel_direct_writes = 1; } } fuse_finish_interrupt(f, req, &d); @@ -3229,6 +3231,10 @@ static void fuse_lib_open(fuse_req_t req, fuse_ino_t ino, if (f->conf.no_rofd_flush && (fi->flags & O_ACCMODE) == O_RDONLY) fi->noflush = 1; + + if (fi->direct_io && f->conf.parallel_direct_writes) + fi->parallel_direct_writes = 1; + } fuse_finish_interrupt(f, req, &d); } @@ -4653,6 +4659,7 @@ static const struct fuse_opt fuse_lib_opts[] = { FUSE_LIB_OPT("noforget", remember, -1), FUSE_LIB_OPT("remember=%u", remember, 0), FUSE_LIB_OPT("modules=%s", modules, 0), + FUSE_LIB_OPT("parallel_direct_write=%d", parallel_direct_writes, 0), FUSE_OPT_END }; diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index a0f8f00..baed664 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -405,6 +405,8 @@ static void fill_open(struct fuse_open_out *arg, arg->open_flags |= FOPEN_NONSEEKABLE; if (f->noflush) arg->open_flags |= FOPEN_NOFLUSH; + if (f->parallel_direct_writes) + arg->open_flags |= FOPEN_PARALLEL_DIRECT_WRITES; } int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e) |