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@xxxxxxxxx> Fixes: ef7e7cbb32 ("fuse: use iomap for writeback") --- Changelog: v1: https://lore.kernel.org/linux-fsdevel/20250804210743.1239373-1-joannelkoong@xxxxxxxxx/#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