aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--example/passthrough.c9
-rw-r--r--example/passthrough_fh.c9
-rw-r--r--example/passthrough_hp.cc6
-rw-r--r--example/passthrough_ll.c6
4 files changed, 26 insertions, 4 deletions
diff --git a/example/passthrough.c b/example/passthrough.c
index dd385c5..5a0d6d7 100644
--- a/example/passthrough.c
+++ b/example/passthrough.c
@@ -59,6 +59,13 @@ static void *xmp_init(struct fuse_conn_info *conn,
(void) conn;
cfg->use_ino = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need either set cfg->direct_io
+ in current function (recommended in high level API) or set fi->direct_io
+ in xmp_create() or xmp_open(). */
+ // cfg->direct_io = 1;
+ cfg->parallel_direct_writes = 1;
+
/* Pick up changes from lower filesystem right away. This is
also necessary for better hardlink support. When the kernel
calls the unlink() handler, it does not know the inode of
@@ -285,7 +292,6 @@ static int xmp_create(const char *path, mode_t mode,
return -errno;
fi->fh = res;
- fi->parallel_direct_writes = 1;
return 0;
}
@@ -298,7 +304,6 @@ static int xmp_open(const char *path, struct fuse_file_info *fi)
return -errno;
fi->fh = res;
- fi->parallel_direct_writes = 1;
return 0;
}
diff --git a/example/passthrough_fh.c b/example/passthrough_fh.c
index 51df3be..ec426a8 100644
--- a/example/passthrough_fh.c
+++ b/example/passthrough_fh.c
@@ -54,6 +54,13 @@ static void *xmp_init(struct fuse_conn_info *conn,
cfg->use_ino = 1;
cfg->nullpath_ok = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need either set cfg->direct_io
+ in current function (recommended in high level API) or set fi->direct_io
+ in xmp_create() or xmp_open(). */
+ // cfg->direct_io = 1;
+ cfg->parallel_direct_writes = 1;
+
/* Pick up changes from lower filesystem right away. This is
also necessary for better hardlink support. When the kernel
calls the unlink() handler, it does not know the inode of
@@ -366,7 +373,6 @@ static int xmp_create(const char *path, mode_t mode, struct fuse_file_info *fi)
return -errno;
fi->fh = fd;
- fi->parallel_direct_writes = 1;
return 0;
}
@@ -379,7 +385,6 @@ static int xmp_open(const char *path, struct fuse_file_info *fi)
return -errno;
fi->fh = fd;
- fi->parallel_direct_writes = 1;
return 0;
}
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index 66fe6f8..9b17de0 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -840,6 +840,9 @@ static void sfs_create(fuse_req_t req, fuse_ino_t parent, const char *name,
if (fs.direct_io)
fi->direct_io = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need set fi->direct_io
+ in current function. */
fi->parallel_direct_writes = 1;
Inode& inode = get_inode(e.ino);
@@ -902,6 +905,9 @@ static void sfs_open(fuse_req_t req, fuse_ino_t ino, fuse_file_info *fi) {
if (fs.direct_io)
fi->direct_io = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need set fi->direct_io
+ in current function. */
fi->parallel_direct_writes = 1;
fi->fh = fd;
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index afac6ea..b15725f 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -775,6 +775,9 @@ static void lo_create(fuse_req_t req, fuse_ino_t parent, const char *name,
else if (lo->cache == CACHE_ALWAYS)
fi->keep_cache = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need set fi->direct_io
+ in current function. */
fi->parallel_direct_writes = 1;
err = lo_do_lookup(req, parent, name, &e);
@@ -834,6 +837,9 @@ static void lo_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
else if (lo->cache == CACHE_ALWAYS)
fi->keep_cache = 1;
+ /* parallel_direct_writes feature depends on direct_io features.
+ To make parallel_direct_writes valid, need set fi->direct_io
+ in current function. */
fi->parallel_direct_writes = 1;
fuse_reply_open(req, fi);