From: Bhupesh Sharma <bhsharma@igalia.com>
To: Theodore Ts'o <tytso@mit.edu>, Bhupesh <bhupesh@igalia.com>
Cc: linux-ext4@vger.kernel.org, kernel-dev@igalia.com,
linux-kernel@vger.kernel.org, revest@google.com,
adilger.kernel@dilger.ca, cascardo@igalia.com
Subject: Re: [PATCH v2 2/2] fs/ext4/xattr: Check for 'xattr_sem' inside 'ext4_xattr_delete_inode'
Date: Tue, 18 Mar 2025 16:36:20 +0530 [thread overview]
Message-ID: <61221d19-a8df-4ee0-6123-2abde5eaaadd@igalia.com> (raw)
In-Reply-To: <20250317151728.GC954365@mit.edu>
Hi Ted,
On 3/17/25 8:47 PM, Theodore Ts'o wrote:
> On Tue, Jan 28, 2025 at 01:57:51PM +0530, Bhupesh wrote:
>> Once we are inside the 'ext4_xattr_delete_inode' function and trying
>> to delete the inode, the 'xattr_sem' should be unlocked.
>>
>> We need trylock here to avoid false-positive warning from lockdep
>> about reclaim circular dependency.
>>
>> This makes the 'ext4_xattr_delete_inode' implementation mimic the
>> existing 'ext2_xattr_delete_inode' implementation and thus avoid
>> similar lockdep issues while deleting inodes.
>>
>> Signed-off-by: Bhupesh <bhupesh@igalia.com>
> This patch is causing a failure of test ext4/026, and also exposed a
> bug in e2fsprogs[1]. With the e2fsprogs bug fixed, the file system
> corruption which is induced by ext4/026 is (when running e2fsck -fn on
> SCRATCH_DEV):
>
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Regular filesystem inode 14 has EA_INODE flag set. Clear? no
>
> Unattached inode 14
> Connect to /lost+found? no
>
> Pass 5: Checking group summary information
>
> /tmp/kvm-xfstests-tytso/vdc.img: ********** WARNING: Filesystem still has errors **********
>
> [1] https://lore.kernel.org/20250317144526.990271-1-tytso@mit.edu
>
> So what appears to be happening is this patch is resulting in ext4/026
> failing to clean up a no-longer-used EA inode, which is unfortunate.
>
> Without the e2fsorigs bug fix, ext4/026 will fail but the error
> message will be much less edifying:
>
> e2fsck 1.47.2 (1-Jan-2025)
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> ext2fs_write_inode: Attempt to write to filesystem opened read-only while writing inode 14 in pass4
> e2fsck: aborted
>
> So I'm going to drop this patch (2/2) from the ext4 tree, but I'm
> going to keep patch 1/2 from this series, since it is fixing a real
> bug. I presume that without this patch, the syzbot reproducer will
> trigger a false lockdep warning, but we can fix that later.
Sure, many thanks for your help.
Regards,
Bhupesh
next prev parent reply other threads:[~2025-03-18 11:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 8:27 [PATCH v2 0/2] fs/ext4/xattr: Fix issues seen while deleting xattr inode(s) Bhupesh
2025-01-28 8:27 ` [PATCH v2 1/2] fs/ext4/xattr: Ignore xattrs past end Bhupesh
2025-01-28 8:27 ` [PATCH v2 2/2] fs/ext4/xattr: Check for 'xattr_sem' inside 'ext4_xattr_delete_inode' Bhupesh
2025-03-17 15:17 ` Theodore Ts'o
2025-03-18 11:06 ` Bhupesh Sharma [this message]
2025-03-18 3:41 ` [PATCH v2 0/2] fs/ext4/xattr: Fix issues seen while deleting xattr inode(s) Theodore Ts'o
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=61221d19-a8df-4ee0-6123-2abde5eaaadd@igalia.com \
--to=bhsharma@igalia.com \
--cc=adilger.kernel@dilger.ca \
--cc=bhupesh@igalia.com \
--cc=cascardo@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=revest@google.com \
--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
all inboxes | Powered by JetHome®