Re: [PATCH 06/18] xfs: make xfs_writepage_map extent map centric

Christoph Hellwig
2018-05-31T16:05:53Z

On Wed, May 30, 2018 at 01:39:56PM -0400, Brian Foster wrote:
> What if the file is reflinked and the current page covers a non-shared
> block but has an overlapping cow mapping due to cowextsize? The current
> logic unconditionally uses the COW mapping for writeback. The updated
> logic doesn't appear to do that in all cases. Consider if the current
> imap was delalloc (and so not trimmed) or the cow mapping was introduced
> after the current imap was mapped. This logic appears to prioritize the
> current mapping so long as it is valid. Doesn't that break the
> cowextsize hint?

It does. I've fixed it for the next version.