Re: [RFC 2/6] mm/filemap: refuse dmabuf iterators in the generic read/write copy paths
From: Mengmeng Zhao
Date: Sun Nov 08 2026 - 21:54:35 EST
On 11/6/26 18:42, Christoph Hellwig wrote:
> 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.
>
Sorry for the inaccuracy, it refers to the buffered io patch in
generic_file_read_iter() and __generic_file_write_uter().
>> 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.
>
Ok, I will put it in the callers side.