linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fuse: keep inode->i_blkbits constant
@ 2025-08-07 17:50 Joanne Koong
  2025-08-08 13:47 ` Christian Brauner
  2025-08-12  8:27 ` Miklos Szeredi
  0 siblings, 2 replies; 8+ messages in thread
From: Joanne Koong @ 2025-08-07 17:50 UTC (permalink / raw)
  To: miklos, brauner; +Cc: djwong, linux-fsdevel, kernel-team

With fuse now using iomap for writeback handling, inode blkbits changes
are problematic because iomap relies on inode->i_blkbits for its
internal bitmap logic. Currently we change inode->i_blkbits in fuse to
match the attr->blksize value passed in by the server.

This commit keeps inode->i_blkbits constant in fuse. Any attr->blksize
values passed in by the server will not update inode->i_blkbits. The
client-side behavior for stat is unaffected, stat will still reflect the
blocksize passed in by the server.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Fixes: ef7e7cbb32 ("fuse: use iomap for writeback")
---
Changelog:
v1: https://lore.kernel.org/linux-fsdevel/20250804210743.1239373-1-joannelkoong@gmail.com/#t
v1 -> v2:
  * Remove warning and keep stat() behavior unchanged (Miklos)
  * Dropped 2nd patch
---
 fs/fuse/inode.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index bfe8d8af46f3..33632c32ba6c 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -285,11 +285,6 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
 		}
 	}
 
-	if (attr->blksize != 0)
-		inode->i_blkbits = ilog2(attr->blksize);
-	else
-		inode->i_blkbits = inode->i_sb->s_blocksize_bits;
-
 	/*
 	 * Don't set the sticky bit in i_mode, unless we want the VFS
 	 * to check permissions.  This prevents failures due to the
-- 
2.47.3


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

end of thread, other threads:[~2025-08-14 16:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 17:50 [PATCH v2] fuse: keep inode->i_blkbits constant Joanne Koong
2025-08-08 13:47 ` Christian Brauner
2025-08-12  8:27 ` Miklos Szeredi
2025-08-12 16:58   ` Joanne Koong
2025-08-12 19:59   ` Darrick J. Wong
2025-08-12 20:44     ` Joanne Koong
2025-08-13  8:24       ` Miklos Szeredi
2025-08-14 16:45         ` Darrick J. Wong

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).