From: sashiko-bot@kernel.org
To: arzuagapozosergio@gmail.com
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v9] ext4: bound xattr journal credits to transaction limit
Date: Wed, 25 Nov 2026 07:37:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-232820@kernel.org> (raw)
In-Reply-To: <20261125072006.32251-1-arzuagapozosergio@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] selftests: ext4: missing KHDR_INCLUDES in Makefile
- [Low] ext4: changelog notes placed in commit message and missing Fixes
tags
--
commit 3240428a7d5aa26a79642ee4a851967a647d2656
Author: Ryuji Hiroshi <arzuagapozosergio@gmail.com>
> ext4: bound xattr journal credits to transaction limit
>
> When setting an xattr without XATTR_CREATE, ext4 reserves credits for
> releasing an old ea_inode even when the attribute does not exist. On a
> 1 KiB-block filesystem with a minimum journal, this can request more
> credits than JBD2 permits, triggering a warning before the operation
> fails.
>
> Drop the obsolete credits for releasing an old ea_inode. Since
> ext4_put_ea_inode() defers the final iput to a worker, freeing the old
> value's blocks does not happen in the current transaction. Continue to
> count ea_inode references in the external xattr block for the case where
> it must be cloned, and check the estimate against the transaction limit
> after reserving the default JBD2 revoke credits. Repeat the estimate under
> the xattr write lock before modifying the attribute.
>
> When an identical xattr block is reused from the cache, drop the
> provisional ea_inode reference unless the block was modified in place.
> Handle both a different cached block and the original block being found
> after cloning. Bound the aggregate credits for inherited xattrs during
> inode creation against the JBD2 transaction limit before starting a
> handle. Add EXT4 selftests for these paths.
>
> Fixes: dec214d00e0d ("ext4: xattr inode deduplication")
> Reported-by: syzbot+25d45c0bd716f2b794a7@syzkaller.appspotmail.com
> Link: https://syzbot.org/bug?extid=25d45c0bd716f2b794a7
> Assisted-by: Codex:GPT-6
> Signed-off-by: Ryuji Hiroshi <arzuagapozosergio@gmail.com>
>
> Changes in v9:
> - Skip the large default ACL test when the filesystem reports
> EOPNOTSUPP, as happens when POSIX ACL support is disabled.
>
> Tests:
> - make -C tools/testing/selftests/filesystems/ext4 clean all
> - sh -n tools/testing/selftests/filesystems/ext4/ext4_xattr_journal_credits.sh
> - Booted the v8 kernel in QEMU/KVM with a 1 KiB-block, 128-byte-inode
> ea_inode filesystem and 1 MiB journal; all 4 harness tests passed.
> - e2fsck -fn passed after the guest unmounted the filesystem.
[Severity: Low]
The "Changes in v9:" and "Tests:" sections sit above the "---" separator,
so git am will record them in the permanent commit history.
Also, in addition to dec214d00e0d ("ext4: xattr inode deduplication"),
this patch fixes the unbounded new-inode xattr credit calculation in
__ext4_new_inode() and the provisional ea_inode reference leak on cached
xattr block reuse in ext4_xattr_block_set(). Should it also include:
Fixes: af65207c76ce ("ext4: fix __ext4_new_inode() journal credits calculation")
Fixes: 0a46ef234756 ("ext4: do not create EA inode under buffer lock")
[ ... ]
> diff --git a/tools/testing/selftests/filesystems/ext4/Makefile b/tools/testing/selftests/filesystems/ext4/Makefile
> new file mode 100644
> index 0000000000000..90569a1ccef38
> --- /dev/null
> +++ b/tools/testing/selftests/filesystems/ext4/Makefile
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +TEST_GEN_PROGS_EXTENDED := ext4_xattr_journal_credits
> +TEST_PROGS := ext4_xattr_journal_credits.sh
> +
> +include ../../lib.mk
[Severity: Low]
Should this Makefile add "CFLAGS += $(KHDR_INCLUDES)"?
ext4_xattr_journal_credits.c includes <linux/posix_acl.h> and
<linux/posix_acl_xattr.h>, and lib.mk defines KHDR_INCLUDES without
adding it to CFLAGS automatically, so the build otherwise falls back to
the host's /usr/include.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125072006.32251-1-arzuagapozosergio@gmail.com?part=1
prev parent reply other threads:[~2026-11-25 7:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 7:53 [PATCH] ext4: bound xattr journal credits to transaction limit arzuagapozosergio
2026-11-22 8:09 ` sashiko-bot
2026-11-22 8:49 ` [PATCH v2] " arzuagapozosergio
2026-11-22 9:09 ` sashiko-bot
2026-11-22 9:37 ` [PATCH v3] " arzuagapozosergio
2026-11-22 9:53 ` sashiko-bot
2026-11-24 12:38 ` Jan Kara
2026-11-25 4:51 ` [PATCH v4] " arzuagapozosergio
2026-11-25 5:09 ` sashiko-bot
2026-11-25 5:19 ` [PATCH v5] " arzuagapozosergio
2026-11-25 5:39 ` sashiko-bot
2026-11-25 6:01 ` [PATCH v6] " arzuagapozosergio
2026-11-25 6:23 ` sashiko-bot
2026-11-25 6:30 ` [PATCH v7] " arzuagapozosergio
2026-11-25 6:47 ` sashiko-bot
2026-11-25 7:00 ` [PATCH v8] " arzuagapozosergio
2026-11-25 7:16 ` sashiko-bot
2026-11-25 7:20 ` [PATCH v9] " arzuagapozosergio
2026-11-25 7:37 ` sashiko-bot [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=sashiko-outbox-232820@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arzuagapozosergio@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
/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