Re: [PATCH 10/17] mm/filemap: make buffered writes work with RWF_UNCACHED
From: Jens Axboe
Date: Mon Nov 18 2024 - 09:50:24 EST
On 11/18/24 1:42 AM, Baokun Li wrote:
>> diff --git a/include/linux/fs.h b/include/linux/fs.h
>> index 45510d0b8de0..122ae821989f 100644
>> --- a/include/linux/fs.h
>> +++ b/include/linux/fs.h
>> @@ -2877,6 +2877,11 @@ static inline ssize_t generic_write_sync(struct kiocb *iocb, ssize_t count)
>> (iocb->ki_flags & IOCB_SYNC) ? 0 : 1);
>> if (ret)
>> return ret;
>> + } else if (iocb->ki_flags & IOCB_UNCACHED) {
>> + struct address_space *mapping = iocb->ki_filp->f_mapping;
>> +
>> + filemap_fdatawrite_range_kick(mapping, iocb->ki_pos,
>> + iocb->ki_pos + count);
>> }
>>
>
> Hi Jens,
>
> The filemap_fdatawrite_range_kick() helper function is not added until
> the next patch, so you should swap the order of patch 10 and patch 11.
Ah thanks, not sure how I missed that. I'll swap them for the next
posting, and also do a basic bisection test just to ensure I did't do
more of those...
--
Jens Axboe