From: "Darrick J. Wong" <djwong@kernel.org>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
Naresh Kamboju <naresh.kamboju@linaro.org>,
linux-fsdevel@vger.kernel.org, linux-mm <linux-mm@kvack.org>,
linux-xfs@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
Linux Regressions <regressions@lists.linux.dev>,
Miklos Szeredi <miklos@szeredi.hu>, Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Brauner <brauner@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <liam.howlett@oracle.com>,
Arnd Bergmann <arnd@arndb.de>,
Dan Carpenter <dan.carpenter@linaro.org>,
Anders Roxell <anders.roxell@linaro.org>,
Ben Copeland <benjamin.copeland@linaro.org>
Subject: Re: next-20250721 arm64 16K and 64K page size WARNING fs fuse file.c at fuse_iomap_writeback_range
Date: Mon, 28 Jul 2025 11:43:45 -0700 [thread overview]
Message-ID: <20250728184345.GD2672070@frogsfrogsfrogs> (raw)
In-Reply-To: <CAJnrk1aXvVf7jaK9_2PamK5X+1b+crT+kmn8vktv0nxqCtcW8g@mail.gmail.com>
On Mon, Jul 28, 2025 at 10:55:42AM -0700, Joanne Koong wrote:
> On Mon, Jul 28, 2025 at 10:34 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Fri, Jul 25, 2025 at 06:16:15PM -0700, Joanne Koong wrote:
> > > > > > > Also, I just noticed that apparently the blocksize can change
> > > > > > > dynamically for an inode in fuse through getattr replies from the
> > > > > > > server (see fuse_change_attributes_common()). This is a problem since
> > > > > > > the iomap uses inode->i_blkbits for reading/writing to the bitmap. I
> > > > > > > think we will have to cache the inode blkbits in the iomap_folio_state
> > > > > > > struct unfortunately :( I'll think about this some more and send out a
> > > > > > > patch for this.
> >
> > Does this actually happen in practice, once you've started _using_ the
> > block device? Rather than all this complicated stuff to invalidate the
For most block device filesystems? No. And as far as I can tell, none
of the filesystems actually support changing i_blkbits on the fly; I
think only block devices can do that:
$ git grep 'i_blkbits\s=\s'
block/bdev.c:150: BD_INODE(bdev)->i_blkbits = blksize_bits(bsize);
block/bdev.c:209: inode->i_blkbits = blksize_bits(size);
fs/ceph/inode.c:81: inode->i_blkbits = CEPH_FSCRYPT_BLOCK_SHIFT;
fs/ceph/inode.c:1071: inode->i_blkbits = CEPH_FSCRYPT_BLOCK_SHIFT;
fs/ceph/inode.c:1076: inode->i_blkbits = CEPH_BLOCK_SHIFT;
fs/ceph/inode.c:1180: inode->i_blkbits = PAGE_SHIFT;
fs/direct-io.c:612: unsigned int i_blkbits = sdio->blkbits + sdio->blkfactor;
fs/direct-io.c:908: const unsigned i_blkbits = blkbits + sdio->blkfactor;
fs/direct-io.c:1110: unsigned i_blkbits = READ_ONCE(inode->i_blkbits);
fs/erofs/fscache.c:527: inode->i_blkbits = EROFS_SB(sb)->blkszbits;
fs/fuse/file_iomap.c:2327: inode->i_blkbits = new_blkbits;
fs/fuse/inode.c:304: inode->i_blkbits = new_blkbits;
fs/inode.c:234: inode->i_blkbits = sb->s_blocksize_bits;
fs/libfs.c:1761: inode->i_blkbits = PAGE_SHIFT;
fs/ocfs2/aops.c:2123: unsigned int i_blkbits = inode->i_sb->s_blocksize_bits;
fs/orangefs/orangefs-utils.c:320: inode->i_blkbits = ffs(new_op->downcall.resp.getattr.
fs/smb/client/cifsfs.c:411: cifs_inode->netfs.inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
fs/stack.c:72: dest->i_blkbits = src->i_blkbits;
fs/vboxsf/utils.c:123: inode->i_blkbits = 12;
> > page cache based on the fuse server telling us something, maybe just
> > declare the server to be misbehaving and shut the whole filesystem down?
> >
>
> I don't think this case is likely at all but I guess one scenario
> where the server might want to change the block size midway through is
> if they send the data to some network filesystem on the backend and if
> that backend shuts down or is at full capacity for whatever reason and
> they need to migrate to another backend that uses a different block
> size then I guess this would be useful for that.
Maybe, but it would still be pretty extraordinary to change the block
size on an open file -- any program that tries to do its IO in blocks
(i.e. not a byte stream) has already stat'd the file and will be very
confused.
> fuse currently does allow the block size to be changed dynamically so
> I'm not sure if we can change that behavior without breaking backwards
> compatibility.
<nod> For fuse+iomap I'm not going to allow it initially if there's
anything in the pagecache ... but I could be talked into it.
--D
next prev parent reply other threads:[~2025-07-28 18:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 11:44 next-20250721 arm64 16K and 64K page size WARNING fs fuse file.c at fuse_iomap_writeback_range Naresh Kamboju
2025-07-23 14:46 ` Darrick J. Wong
2025-07-23 18:42 ` Joanne Koong
2025-07-23 21:20 ` Darrick J. Wong
2025-07-23 22:37 ` Joanne Koong
2025-07-24 19:14 ` Joanne Koong
2025-07-26 1:16 ` Joanne Koong
2025-07-28 17:14 ` Darrick J. Wong
2025-07-28 17:44 ` Joanne Koong
2025-07-28 19:11 ` Darrick J. Wong
2025-07-28 21:28 ` Joanne Koong
2025-07-29 20:21 ` Darrick J. Wong
2025-07-29 23:23 ` Joanne Koong
2025-07-29 23:40 ` Darrick J. Wong
2025-07-30 22:54 ` Joanne Koong
2025-07-31 17:55 ` Darrick J. Wong
2025-07-31 20:48 ` Joanne Koong
2025-08-12 16:42 ` Darrick J. Wong
2025-07-28 17:34 ` Matthew Wilcox
2025-07-28 17:55 ` Joanne Koong
2025-07-28 18:43 ` Darrick J. Wong [this message]
2025-07-23 23:15 ` Joanne Koong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250728184345.GD2672070@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=benjamin.copeland@linaro.org \
--cc=brauner@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=jack@suse.cz \
--cc=joannelkoong@gmail.com \
--cc=liam.howlett@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=miklos@szeredi.hu \
--cc=naresh.kamboju@linaro.org \
--cc=regressions@lists.linux.dev \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.