linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fuse: Disable the combination of passthrough and writeback cache
@ 2024-07-03 17:30 Bernd Schubert
  2024-07-04 15:09 ` Josef Bacik
  2024-08-28 16:37 ` Miklos Szeredi
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Schubert @ 2024-07-03 17:30 UTC (permalink / raw)
  To: miklos
  Cc: linux-fsdevel, bernd.schubert, amir73il, drosen, Bernd Schubert,
	stable

Current design and handling of passthrough is without fuse
caching and with that FUSE_WRITEBACK_CACHE is conflicting.

Fixes: 7dc4e97a4f9a ("fuse: introduce FUSE_PASSTHROUGH capability")
Cc: stable@kernel.org
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
---
 fs/fuse/inode.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 99e44ea7d875..569921d0feab 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1320,11 +1320,16 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
 			 * on a stacked fs (e.g. overlayfs) themselves and with
 			 * max_stack_depth == 1, FUSE fs can be stacked as the
 			 * underlying fs of a stacked fs (e.g. overlayfs).
+			 *
+			 * Also don't allow the combination of FUSE_PASSTHROUGH
+			 * and FUSE_WRITEBACK_CACHE, current design doesn't handle
+			 * them together.
 			 */
 			if (IS_ENABLED(CONFIG_FUSE_PASSTHROUGH) &&
 			    (flags & FUSE_PASSTHROUGH) &&
 			    arg->max_stack_depth > 0 &&
-			    arg->max_stack_depth <= FILESYSTEM_MAX_STACK_DEPTH) {
+			    arg->max_stack_depth <= FILESYSTEM_MAX_STACK_DEPTH &&
+			    !(flags & FUSE_WRITEBACK_CACHE))  {
 				fc->passthrough = 1;
 				fc->max_stack_depth = arg->max_stack_depth;
 				fm->sb->s_stack_depth = arg->max_stack_depth;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fuse: Disable the combination of passthrough and writeback cache
  2024-07-03 17:30 [PATCH] fuse: Disable the combination of passthrough and writeback cache Bernd Schubert
@ 2024-07-04 15:09 ` Josef Bacik
  2024-08-28 16:37 ` Miklos Szeredi
  1 sibling, 0 replies; 3+ messages in thread
From: Josef Bacik @ 2024-07-04 15:09 UTC (permalink / raw)
  To: Bernd Schubert
  Cc: miklos, linux-fsdevel, bernd.schubert, amir73il, drosen, stable

On Wed, Jul 03, 2024 at 07:30:20PM +0200, Bernd Schubert wrote:
> Current design and handling of passthrough is without fuse
> caching and with that FUSE_WRITEBACK_CACHE is conflicting.
> 
> Fixes: 7dc4e97a4f9a ("fuse: introduce FUSE_PASSTHROUGH capability")
> Cc: stable@kernel.org
> Signed-off-by: Bernd Schubert <bschubert@ddn.com>

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fuse: Disable the combination of passthrough and writeback cache
  2024-07-03 17:30 [PATCH] fuse: Disable the combination of passthrough and writeback cache Bernd Schubert
  2024-07-04 15:09 ` Josef Bacik
@ 2024-08-28 16:37 ` Miklos Szeredi
  1 sibling, 0 replies; 3+ messages in thread
From: Miklos Szeredi @ 2024-08-28 16:37 UTC (permalink / raw)
  To: Bernd Schubert; +Cc: linux-fsdevel, bernd.schubert, amir73il, drosen, stable

On Wed, 3 Jul 2024 at 19:31, Bernd Schubert <bschubert@ddn.com> wrote:
>
> Current design and handling of passthrough is without fuse
> caching and with that FUSE_WRITEBACK_CACHE is conflicting.
>
> Fixes: 7dc4e97a4f9a ("fuse: introduce FUSE_PASSTHROUGH capability")
> Cc: stable@kernel.org
> Signed-off-by: Bernd Schubert <bschubert@ddn.com>

Applied, thanks.

Miklos

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-28 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 17:30 [PATCH] fuse: Disable the combination of passthrough and writeback cache Bernd Schubert
2024-07-04 15:09 ` Josef Bacik
2024-08-28 16:37 ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).