From: Hyeontae Lee <wonju345@naver.com>
To: linkinjeon@kernel.org
Cc: hyc.lee@gmail.com, zzzccc427@gmail.com, baijiaju1990@gmail.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Hyeontae Lee <wonju345@naver.com>
Subject: Re: [PATCH] ntfs: serialize the resident read iomap path with mrec_lock
Date: Sat, 1 Aug 2026 15:27:05 +0900 [thread overview]
Message-ID: <20260801062705.48184-1-wonju345@naver.com> (raw)
In-Reply-To: <CAKYAXd-Pt1s2M6dnB6kCeHMB2KDqGQ2JoDGGv_-kD+Z4Rc9YNQ@mail.gmail.com>
Hi Namjae,
You are right - my version drops the lock before the iomap core copies from
iomap->inline_data, so the copy itself was still unprotected.
I tested your patch and it fixes the issue:
KCSAN, two runs of 180 seconds each on the same reproducer:
run 1: 206,015 read faults, 415,351 link/unlink cycles
run 2: 205,732 read faults, 421,672 link/unlink cycles
No data-race reports in ntfs_attr_find(), ntfs_attr_value_is_valid() or
ntfs_read_iomap_begin_resident(), and no "is corrupt" messages. Before the
fix the same reproducer produced 40 reports in about one second.
PROVE_LOCKING, 60 seconds with the same reproducer: 1,199,159 read faults,
1,396,557 link/unlink cycles, no lockdep splat. Mount, read, write and
unmount all behave normally.
Tested-by: Hyeontae Lee <wonju345@naver.com>
Thanks,
Hyeontae
prev parent reply other threads:[~2026-08-01 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 4:24 [BUG] ntfs: data race on ni->mrec between resident read path and MFT record mutation Hyeontae Lee
2026-07-27 5:37 ` Hyunchul Lee
2026-07-28 10:42 ` Hyeontae Lee
2026-07-31 9:10 ` [PATCH] ntfs: serialize the resident read iomap path with mrec_lock Hyeontae Lee
2026-07-31 15:00 ` Namjae Jeon
2026-08-01 6:27 ` Hyeontae Lee [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=20260801062705.48184-1-wonju345@naver.com \
--to=wonju345@naver.com \
--cc=baijiaju1990@gmail.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zzzccc427@gmail.com \
/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®