Re: [PATCH v3] exfat: validate cached iomaps during buffered writes and writeback
From: Chi Zhiling
Date: Thu Jul 02 2026 - 09:35:33 EST
On 7/2/26 8:54 PM, Namjae Jeon wrote:
On Thu, Jul 2, 2026 at 11:45 AM Chi Zhiling <chizhiling@xxxxxxx> wrote:
Do you have an actual reproducer or an observed corruption for this ?
From: Chi Zhiling <chizhiling@xxxxxxxxxx>
Writeback does not hold i_rwsem and can race with truncate or other
operations that change the file's block mapping. This may leave cached
iomaps stale, causing writeback to write data to blocks that no longer
belong to the file.
Thanks.
I haven't actually observed any data corruption, and I haven't been able to reproduce the issue.
I just checked the code again, and it seems this issue cannot actually occur. The reason is that no operation other than truncate can modify the block mapping, and truncate waits for page reclaim to complete before releasing it.
Sorry for taking up your time, and thank you very much for your help :)