From: Mateusz Guzik <mjguzik@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Christian Brauner <brauner@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: generic_permission() optimization
Date: Mon, 17 Nov 2025 12:42:14 +0100 [thread overview]
Message-ID: <CAGudoHFeS6GUxMdm9dJoswEViHHFvgV+FEbSqo4+RP4L_P84zw@mail.gmail.com> (raw)
In-Reply-To: <kn44smk4dgaj5rqmtcfr7ruecixzrik6omur2l2opitn7lbvfm@rm4y24fcfzbz>
On Wed, Nov 5, 2025 at 2:37 PM Jan Kara <jack@suse.cz> wrote:
>
> On Wed 05-11-25 12:51:16, Mateusz Guzik wrote:
> > On Wed, Nov 5, 2025 at 12:50 PM Mateusz Guzik <mjguzik@gmail.com> wrote:
> > >
> > > On Sun, Apr 13, 2025 at 2:40 PM Theodore Ts'o <tytso@mit.edu> wrote:
> > > >
> > > > On Sun, Apr 13, 2025 at 11:41:47AM +0200, Mateusz Guzik wrote:
> > > > > This is the rootfs of the thing, so I tried it out with merely
> > > > > printing it. I got 70 entries at boot time. I don't think figuring out
> > > > > what this is specifically is warranted (it is on debian though).
> > > >
> > > > Well, can you run:
> > > >
> > > > debugfs -R "stat <INO>" /dev/ROOT_DEV
> > > >
> > > > on say, two or three of the inodes (replace INO with a number, and
> > > > ROOT_DEV with the root file system device) and send me the result?
> > > > That would be really helpful in understanding what might be going on.
> > > >
> > > > > So... I think this is good enough to commit? I had no part in writing
> > > > > the patch and I'm not an ext4 person, so I'm not submitting it myself.
> > > > >
> > > > > Ted, you seem fine with the patch, so perhaps you could do the needful(tm)?
> > > >
> > > > Sure, I'll put together a more formal patch and do full QA run and
> > > > checking of the code paths, as a supposed a fairly superficial review
> > > > and hack.
> > > >
> > >
> > > It looks like this well through the cracks.
> > >
> > > To recount, here is the patch (by Linus, not me):
> > > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> > > > index f386de8c12f6..3e0ba7c4723a 100644
> > > > --- a/fs/ext4/inode.c
> > > > +++ b/fs/ext4/inode.c
> > > > @@ -5109,6 +5109,11 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
> > > > goto bad_inode;
> > > > brelse(iloc.bh);
> > > >
> > > > + if (test_opt(sb, DEBUG) &&
> > > > + (ext4_test_inode_state(inode, EXT4_STATE_XATTR) ||
> > > > + ei->i_file_acl))
> > > > + ext4_msg(sb, KERN_DEBUG, "has xattr ino %lu", inode->i_ino);
> > > > +
> > > > unlock_new_inode(inode);
> > > > return inode;
> > >
> >
> > sigh, copy-pasto, the patch is:
> > --- a/fs/ext4/inode.c
> > +++ b/fs/ext4/inode.c
> > @@ -5011,6 +5011,11 @@ struct inode *__ext4_iget(...
> > }
> >
> > brelse(iloc.bh);
> > +
> > + /* Initialize the "no ACL's" state for the simple cases */
> > + if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR) && !ei->i_file_acl)
> > + cache_no_acl(inode);
> > +
> > unlock_new_inode(inode);
> > return inode;
>
> This looks fine. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
>
ping?
the window to get this in 6.19 is closing (if not too late already),
would be a bummer if it did not make it
prev parent reply other threads:[~2025-11-17 11:42 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 4:16 generic_permission() optimization Linus Torvalds
2024-10-31 6:05 ` Al Viro
2024-10-31 6:42 ` Linus Torvalds
2024-10-31 18:14 ` Linus Torvalds
2024-10-31 22:28 ` Al Viro
2024-10-31 22:34 ` Linus Torvalds
2024-11-01 1:17 ` Linus Torvalds
2024-11-01 1:27 ` Al Viro
2024-11-01 13:15 ` Christian Brauner
2024-10-31 13:02 ` Christian Brauner
2024-10-31 19:04 ` Linus Torvalds
2024-10-31 22:02 ` Linus Torvalds
2024-10-31 22:31 ` Linus Torvalds
2024-11-07 19:54 ` Linus Torvalds
2024-11-07 22:22 ` Mateusz Guzik
2024-11-07 22:49 ` Linus Torvalds
2025-04-12 16:26 ` Mateusz Guzik
2025-04-12 20:22 ` Linus Torvalds
2025-04-14 10:21 ` Christian Brauner
2025-04-16 13:17 ` [PATCH RFC 0/3] mnt_idmapping: avoid pointer chase & inline low-level helpers Christian Brauner
2025-04-16 13:17 ` [PATCH RFC 1/3] inode: add fastpath for filesystem user namespace retrieval Christian Brauner
2025-04-16 13:49 ` Mateusz Guzik
2025-04-16 14:14 ` Christian Brauner
2025-04-22 10:37 ` Jan Kara
2025-04-22 13:33 ` Mateusz Guzik
2025-04-22 14:05 ` Christian Brauner
2025-04-16 13:17 ` [PATCH RFC 2/3] mnt_idmapping: add struct mnt_idmap to header Christian Brauner
2025-04-16 13:17 ` [PATCH RFC 3/3] mnt_idmapping: inline all low-level helpers Christian Brauner
2025-04-16 15:04 ` Linus Torvalds
2025-04-22 9:28 ` Christian Brauner
2025-04-12 21:52 ` generic_permission() optimization Theodore Ts'o
2025-04-12 22:36 ` Linus Torvalds
2025-04-12 23:12 ` Linus Torvalds
2025-04-12 23:55 ` Theodore Ts'o
2025-04-13 9:41 ` Mateusz Guzik
2025-04-13 12:40 ` Theodore Ts'o
2025-04-13 12:52 ` Mateusz Guzik
2025-04-13 17:29 ` Theodore Ts'o
2025-11-05 11:50 ` Mateusz Guzik
2025-11-05 11:51 ` Mateusz Guzik
2025-11-05 13:37 ` Jan Kara
2025-11-17 11:42 ` Mateusz Guzik [this message]
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=CAGudoHFeS6GUxMdm9dJoswEViHHFvgV+FEbSqo4+RP4L_P84zw@mail.gmail.com \
--to=mjguzik@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--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;
as well as URLs for NNTP newsgroup(s).