Skip to content

Commit 3ab394b

Browse files
bsberndMiklos Szeredi
authored andcommitted
fuse: disable the combination of passthrough and writeback cache
Current design and handling of passthrough is without fuse caching and with that FUSE_WRITEBACK_CACHE is conflicting. Fixes: 7dc4e97 ("fuse: introduce FUSE_PASSTHROUGH capability") Cc: [email protected] # v6.9 Signed-off-by: Bernd Schubert <[email protected]> Acked-by: Amir Goldstein <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent f7790d6 commit 3ab394b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/fuse/inode.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,11 +1332,16 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
13321332
* on a stacked fs (e.g. overlayfs) themselves and with
13331333
* max_stack_depth == 1, FUSE fs can be stacked as the
13341334
* underlying fs of a stacked fs (e.g. overlayfs).
1335+
*
1336+
* Also don't allow the combination of FUSE_PASSTHROUGH
1337+
* and FUSE_WRITEBACK_CACHE, current design doesn't handle
1338+
* them together.
13351339
*/
13361340
if (IS_ENABLED(CONFIG_FUSE_PASSTHROUGH) &&
13371341
(flags & FUSE_PASSTHROUGH) &&
13381342
arg->max_stack_depth > 0 &&
1339-
arg->max_stack_depth <= FILESYSTEM_MAX_STACK_DEPTH) {
1343+
arg->max_stack_depth <= FILESYSTEM_MAX_STACK_DEPTH &&
1344+
!(flags & FUSE_WRITEBACK_CACHE)) {
13401345
fc->passthrough = 1;
13411346
fc->max_stack_depth = arg->max_stack_depth;
13421347
fm->sb->s_stack_depth = arg->max_stack_depth;

0 commit comments

Comments
 (0)