diff options
author | yangyun <yangyun50@huawei.com> | 2024-02-23 11:06:08 +0800 |
---|---|---|
committer | yangyun <yangyun50@huawei.com> | 2024-02-23 15:01:29 +0800 |
commit | fce970c313bf25ba9ae5b6a335e3293736df3d48 (patch) | |
tree | e38ec6d010af8c954e7c954c5fcf0e2ff6470800 /example/passthrough_ll.c | |
parent | 402c8fff588120a7cf5922822904ce45f30612a8 (diff) | |
download | libfuse-fce970c313bf25ba9ae5b6a335e3293736df3d48.tar.gz |
passthrough_example: make parallel_direct_writes more clearly
Move the parallel_direct_writes enable action to the init function in high level API,
it is more recommended just like commit 8ee553dac. Besides, add some comments to show
that the feature parallel_direct_writes is depend on the feature direct_io (refer to
kernel side patch series to consolidate direct IO, link: https://lwn.net/ml/linux-fsdevel/
20230918150313.3845114-1-bschubert@ddn.com for the reason).
Diffstat (limited to 'example/passthrough_ll.c')
-rw-r--r-- | example/passthrough_ll.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |