linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Joanne Koong <joannelkoong@gmail.com>,
	brauner@kernel.org, linux-fsdevel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH v2] fuse: keep inode->i_blkbits constant
Date: Tue, 12 Aug 2025 12:59:22 -0700	[thread overview]
Message-ID: <20250812195922.GL7942@frogsfrogsfrogs> (raw)
In-Reply-To: <CAJfpeguCOxeVX88_zPd1hqziB_C+tmfuDhZP5qO2nKmnb-dTUA@mail.gmail.com>

On Tue, Aug 12, 2025 at 10:27:41AM +0200, Miklos Szeredi wrote:
> On Thu, 7 Aug 2025 at 19:51, Joanne Koong <joannelkoong@gmail.com> wrote:
> >
> > 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.
> 
> Not quite.  You also need to save ilog2(attr->blksize) in
> fi->orig_i_blkbits and restore it after calling generic_fillattr() in
> fuse_update_get_attr() just like it's done for i_mode and i_ino.

Why is that?  Is the goal here that fstat() should always return the
most recent blocksize the fuse server reported, even if the pagecache
accounting still uses the blocksize first reported when the kernel
created the incore struct inode?

--D

  parent reply	other threads:[~2025-08-12 19:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-08-12 20:44     ` Joanne Koong
2025-08-13  8:24       ` Miklos Szeredi
2025-08-14 16:45         ` Darrick J. Wong

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=20250812195922.GL7942@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=brauner@kernel.org \
    --cc=joannelkoong@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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 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).