Skip to content

fuse: disallow dynamic inode blksize changes

Joanne Koong linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fuse: disallow dynamic inode blksize changesfs/fuse/dir.c fs/fuse/inode.c include/uapi/linux/fuse.h+5 -142 replies
2/2fuse: add blksize configuration at mount for non-fuseblk serversfs/fuse/inode.c+7 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] fuse: disallow dynamic inode blksize changes

With fuse now using iomap for writeback handling, inode blocksize changes are problematic because iomap relies on the inode blocksize value for its internal bitmap logic.

There are a few options for addressing this, as discussed in [1].
a) add "u8 blkbits" to iomap internals (struct iomap_folio_state) and change iomap logic to use this static value instead of using inode->i_blkbits
b) remove all folios for the inode from the page cache and synchronize that with modifying inode->i_blkbits
(unfortunately this does not work, see [1] for more details)
c) disallow the inode blocksize from changing dynamically in fuse

In the discussion in [1], we decided to go with c) given that servers don't have a good use case for dynamically modifying the blocksize and it doesn't seem likely that servers use this. If the server wishes to set a constant blocksize for all inodes, then from patch 2, this can be done at mount time through the -oblksize= configuration option.

Thanks,
Joanne

[1] https://lore.kernel.org/linux-fsdevel/CAJnrk1ZREcrd=FNUYLVWwXUeJ3mJz9J+aqyEvoHkyG3RrJ2QkA@mail.gmail.com/T/#m13c375821fb36c491626a59b552ed0cc5061736a

Joanne Koong (2):
fuse: disallow dynamic inode blksize changes
fuse: add blksize configuration at mount for non-fuseblk servers

 fs/fuse/dir.c             |  9 +--------
 fs/fuse/inode.c           | 18 +++++++++---------
 include/uapi/linux/fuse.h |  4 ++--
 3 files changed, 12 insertions(+), 19 deletions(-)
Signature · 1 line
2.47.3