Re: [RFC 2/6] mm/filemap: refuse dmabuf iterators in the generic read/write copy paths

From: Christoph Hellwig

Date: Fri Nov 06 2026 - 05:43:25 EST


On Thu, Nov 05, 2026 at 02:58:43PM +0800, Mengmeng Zhao wrote:
> From: Mengmeng Zhao <zhaomengmeng@xxxxxxxxxx>
>
> The generic copy helpers cannot touch device memory.

Which generic copy helpers? This doesn't seem to touch copy_file_range
at all.

> Refuse a
> dmabuf iterator in generic_perform_write() and the filemap_read()
> fallback while keeping any direct-I/O progress, and report a busy
> folio from generic_file_direct_write() as -EAGAIN instead of asking
> for the buffered fallback such an iterator cannot take.

I suspect the fallback code in the callers might be a better stop
for this.