Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

writeback: prep helpers for dirty-limit and writeback accounting

Add helper APIs needed by filesystems to avoid poking into writeback
internals.

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Link: https://patch.msgid.link/20260213054634.79785-2-kundan.kumar@samsung.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Kundan Kumar and committed by
Christian Brauner
a235d3bc 97029699

+13
+13
include/linux/backing-dev.h
··· 136 136 return inode_to_bdi(mapping->host)->capabilities & BDI_CAP_WRITEBACK; 137 137 } 138 138 139 + /* Must not be used by file systems that support cgroup writeback */ 140 + static inline int bdi_wb_dirty_exceeded(struct backing_dev_info *bdi) 141 + { 142 + return bdi->wb.dirty_exceeded; 143 + } 144 + 145 + /* Must not be used by file systems that support cgroup writeback */ 146 + static inline void bdi_wb_stat_mod(struct inode *inode, enum wb_stat_item item, 147 + s64 amount) 148 + { 149 + wb_stat_mod(&inode_to_bdi(inode)->wb, item, amount); 150 + } 151 + 139 152 #ifdef CONFIG_CGROUP_WRITEBACK 140 153 141 154 struct bdi_writeback *wb_get_lookup(struct backing_dev_info *bdi,