Re: [PATCH] ntfs: serialize the resident read iomap path with mrec_lock
Hyeontae Lee <[email protected]> Sat, 1 Aug 2026 15:27:05 +0900
| Newsgroups | org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Thanks, Hyeontae