Re: [RFC PATCH v4 07/17] iomap: Use balance_dirty_pages_ratelimited_flags in iomap_write_iter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5/22/22 12:19 AM, Christoph Hellwig wrote:
> On Fri, May 20, 2022 at 11:36:36AM -0700, Stefan Roesch wrote:
>> @@ -765,14 +765,22 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i)
>>  	do {
>>  		struct folio *folio;
>>  		struct page *page;
>> +		struct address_space *mapping = iter->inode->i_mapping;
>>  		unsigned long offset;	/* Offset into pagecache page */
>>  		unsigned long bytes;	/* Bytes to write to page */
>>  		size_t copied;		/* Bytes copied from user */
>> +		unsigned int bdp_flags =
>> +			(iter->flags & IOMAP_NOWAIT) ? BDP_ASYNC : 0;
> 
> Bot the mapping and bdp_flags don't change over the loop iterations,
> so we can initialize them once at the start of the function.
> 

Moved the variable definitions outside of the loop.

> Otherwise this looks good, but I think this should go into the
> previous patch as it is a central part of supporting async buffered
> writes.
>

I merged it with the previous patch.
 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux