From: Christian Brauner <brauner@kernel.org>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: viro@zeniv.linux.org.uk, jack@suse.cz,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
josef@toxicpanda.com, kernel-team@fb.com, amir73il@gmail.com,
linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-xfs@vger.kernel.org, ocfs2-devel@lists.linux.dev
Subject: Re: [PATCH v3 2/4] fs: hide ->i_state handling behind accessors
Date: Mon, 15 Sep 2025 15:41:02 +0200 [thread overview]
Message-ID: <20250915-tricksen-militant-406d4cb8ebda@brauner> (raw)
In-Reply-To: <CAGudoHG7uPDFH9K9sjnEZxZ_DtXC-ZqSkwzCJUmw1yKAzEA+dQ@mail.gmail.com>
On Mon, Sep 15, 2025 at 03:27:16PM +0200, Mateusz Guzik wrote:
> On Mon, Sep 15, 2025 at 2:41 PM Christian Brauner <brauner@kernel.org> wrote:
> >
> > On Thu, Sep 11, 2025 at 06:55:55AM +0200, Mateusz Guzik wrote:
> > > Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
> > > ---
> >
> > I would do:
> >
> > inode_state()
> > inode_state_raw()
> >
> > Similar to
> >
> > rcu_derefence()
> > rcu_dereference_raw()
> >
>
> I don't follow how to fit this in here.
>
> Here is the complete list:
> inode_state_read
> inode_state_read_unstable
>
> first is a plain read + lockdep assert, second is a READ_ONCE
>
> inode_state_add
> inode_state_add_unchecked
> inode_state_del
> inode_state_del_unchecked
> inode_state_set_unchecked
>
> Routine with _unchecked forego asserts, otherwise the op checks lockdep.
>
> I guess _unchecked could be _raw, but I don't see how to fit this into
> the read thing.
_raw() is adapted from rcu which is why I'm very familiar with what it
means: rcu_dereference() performs checks and rcu_dereference_raw()
doesn't. It's just a naming convention that we already have and are
accustomed to.
>
> Can you just spell out the names you want for all of these?
just use _raw() imho
>
> > But you need some actual commit messages etc...
> >
>
> Ye and I need to runtime test at least with xfs and btrfs.
Something I plan to do soon is more automated testing as soon as patch
series are pulled into one of the VFS trees. And by that I mean visible
to the author of the series. It'll be a while though unless we get
manpower for that.
next prev parent reply other threads:[~2025-09-15 13:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 4:55 [RFC PATCH v3 0/4] ->i_state accessors Mateusz Guzik
2025-09-11 4:55 ` [PATCH v3 1/4] fs: expand dump_inode() Mateusz Guzik
2025-09-11 5:54 ` Dave Chinner
2025-09-11 4:55 ` [PATCH v3 2/4] fs: hide ->i_state handling behind accessors Mateusz Guzik
2025-09-11 6:52 ` Dave Chinner
2025-09-11 9:00 ` Mateusz Guzik
2025-09-15 12:41 ` Christian Brauner
2025-09-15 13:27 ` Mateusz Guzik
2025-09-15 13:41 ` Christian Brauner [this message]
2025-09-15 13:48 ` Mateusz Guzik
2025-09-15 14:16 ` Christian Brauner
2025-09-11 4:55 ` [PATCH v3 3/4] convert all filesystems to use the new ->i_state accessors Mateusz Guzik
2025-09-11 4:55 ` [PATCH v3 4/4] type switch Mateusz Guzik
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=20250915-tricksen-militant-406d4cb8ebda@brauner \
--to=brauner@kernel.org \
--cc=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
/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