Skip to content

Commit 542ede0

Browse files
joannekoongbrauner
authored andcommitted
fuse: keep inode->i_blkbits constant
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> Link: https://lore.kernel.org/20250807175015.515192-1-joannelkoong@gmail.com Fixes: ef7e7cb ("fuse: use iomap for writeback") Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent bef2981 commit 542ede0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/fuse/inode.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,6 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
289289
}
290290
}
291291

292-
if (attr->blksize != 0)
293-
inode->i_blkbits = ilog2(attr->blksize);
294-
else
295-
inode->i_blkbits = inode->i_sb->s_blocksize_bits;
296-
297292
/*
298293
* Don't set the sticky bit in i_mode, unless we want the VFS
299294
* to check permissions. This prevents failures due to the

0 commit comments

Comments
 (0)