Re: [PATCH 10/13] fuse: add support for multiple writeback contexts in fuse

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

 




On 6/2/25 16:21, Christoph Hellwig wrote:
>>  static void fuse_writepage_finish_stat(struct inode *inode, struct folio *folio)
>>  {
>> -	struct backing_dev_info *bdi = inode_to_bdi(inode);
>> +	struct bdi_writeback_ctx *bdi_wb_ctx = fetch_bdi_writeback_ctx(inode);
>>  
>> -	dec_wb_stat(&bdi->wb_ctx_arr[0]->wb, WB_WRITEBACK);
>> +	dec_wb_stat(&bdi_wb_ctx->wb, WB_WRITEBACK);
>>  	node_stat_sub_folio(folio, NR_WRITEBACK_TEMP);
>> -	wb_writeout_inc(&bdi->wb_ctx_arr[0]->wb);
>> +	wb_writeout_inc(&bdi_wb_ctx->wb);
>>  }
> 
> There's nothing fuse-specific here except that nothing but fuse uses
> NR_WRITEBACK_TEMP.  Can we try to move this into the core first so that
> the patches don't have to touch file system code?
> 
>> -	inc_wb_stat(&inode_to_bdi(inode)->wb_ctx_arr[0]->wb, WB_WRITEBACK);
>> +	inc_wb_stat(&bdi_wb_ctx->wb, WB_WRITEBACK);
>>  	node_stat_add_folio(tmp_folio, NR_WRITEBACK_TEMP);
> 
> Same here.  On pattern is that fuse and nfs both touch the node stat
> and the web stat, and having a common helper doing both would probably
> also be very helpful.
> 
> 

Note that Miklos' PR for 6.16 removes NR_WRITEBACK_TEMP through
patches from Joanne, i.e. only 

dec_wb_stat(&bdi->wb, WB_WRITEBACK);

is left over.


Thanks,
Bernd




[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