Re: [PATCH v2 2/8] fsdax: invalidate pages when CoW

2022-12-01 Thread Darrick J. Wong
On Thu, Dec 01, 2022 at 03:28:52PM +, Shiyang Ruan wrote: > CoW changes the share state of a dax page, but the share count of the > page isn't updated. The next time access this page, it should have been > a newly accessed, but old association exists. So, we need to clear the > share state

[PATCH v2 2/8] fsdax: invalidate pages when CoW

2022-12-01 Thread Shiyang Ruan
CoW changes the share state of a dax page, but the share count of the page isn't updated. The next time access this page, it should have been a newly accessed, but old association exists. So, we need to clear the share state when CoW happens, in both dax_iomap_rw() and dax_zero_iter().