From nobody Thu Apr 2 15:37:28 2026 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01FE1272813 for ; Fri, 13 Feb 2026 05:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961897; cv=none; b=POegHmiy5WSiZPTxMbTykmYg1wzfbaKC8YkKtNvRwcLZqPwxOTFZXr65BYN9NfpUgRj/OEmfmvAvRnrKDRTCy2bw2rl9maBzJPtRSgMGAFHOopBy3g+cF1n1n81uVrUMs6rs2eVlzT3FJ9mHA3eYrSwZmQoKEcVymi2hik9KozI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961897; c=relaxed/simple; bh=wQWIr+CWGB+z47NEiJyXgIVKlRtwG2/3Z60WkHTEQ2s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=pX+FN9DlvxdMzgbozSkCJp6FQyKAcpmcx88nuZ6v5MtPBZKaoytaKFWqzi3vQMzlMq5F96J8xi3GrDem7t5cV2z64n2qVEKKYTKWuL/OxaRxN8TASdRtEcaKk8RfX7XpbOFTayDFlIz1yrmrTztwes/LzIsMzDM7dx9kakZ8P3E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=EN9aElZA; arc=none smtp.client-ip=203.254.224.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="EN9aElZA" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20260213055133epoutp0317bbbdf57571991508604b2ed7cca66f~TuHWeFeqG0790307903epoutp03B for ; Fri, 13 Feb 2026 05:51:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20260213055133epoutp0317bbbdf57571991508604b2ed7cca66f~TuHWeFeqG0790307903epoutp03B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770961893; bh=azX7HNGdMHPiAlnAiQeuCQh9Wq2SAgq9ch93GVn8UK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EN9aElZAQxIyB4n8Pa2DGWReaHupTLRwpMdNjzX2DHAxiQj9eD2Eb5PegbFcF7lPl eoddUb+xpO8B5rFKJBBsR6vKT8oTrssnbiRAxYRIMro7ktDiuMsRgX6J7WxzuqIAmW 6CT5nfiEQKyShMv23YYmy5xVyHoDHIvfqTRGG3Mg= Received: from epsnrtp04.localdomain (unknown [182.195.42.156]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260213055133epcas5p1a2d1507d8072b3f6d79ee3da36344158~TuHV1YxhF0793407934epcas5p1K; Fri, 13 Feb 2026 05:51:33 +0000 (GMT) Received: from epcas5p1.samsung.com (unknown [182.195.38.91]) by epsnrtp04.localdomain (Postfix) with ESMTP id 4fC1WP1XTCz6B9mB; Fri, 13 Feb 2026 05:51:29 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20260213055128epcas5p485b1d6ad7d811fa71e0e61e6c0a608eb~TuHRc2CNu2345423454epcas5p4R; Fri, 13 Feb 2026 05:51:28 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260213055124epsmtip2c23bb158484bad0746e1e08e0f3f6bb1~TuHNnkB8M2587625876epsmtip2p; Fri, 13 Feb 2026 05:51:23 +0000 (GMT) From: Kundan Kumar To: jaegeuk@kernel.org, chao@kernel.org, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, hch@lst.de, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk, djwong@kernel.org, jlayton@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, gost.dev@samsung.com, anuj20.g@samsung.com, vishak.g@samsung.com, joshi.k@samsung.com, Kundan Kumar Subject: [PATCH v2 1/4] writeback: prep helpers for dirty-limit and writeback accounting Date: Fri, 13 Feb 2026 11:16:31 +0530 Message-Id: <20260213054634.79785-2-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260213054634.79785-1-kundan.kumar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260213055128epcas5p485b1d6ad7d811fa71e0e61e6c0a608eb X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-542,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260213055128epcas5p485b1d6ad7d811fa71e0e61e6c0a608eb References: <20260213054634.79785-1-kundan.kumar@samsung.com> Add helper APIs needed by filesystems to avoid poking into writeback internals. Reviewed-by: Jan Kara Reviewed-by: Jeff Layton Reviewed-by: Andreas Gruenbacher Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- include/linux/backing-dev.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0c8342747cab..5b7d12b40d5e 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -136,6 +136,19 @@ static inline bool mapping_can_writeback(struct addres= s_space *mapping) return inode_to_bdi(mapping->host)->capabilities & BDI_CAP_WRITEBACK; } =20 +/* Must not be used by file systems that support cgroup writeback */ +static inline int bdi_wb_dirty_exceeded(struct backing_dev_info *bdi) +{ + return bdi->wb.dirty_exceeded; +} + +/* Must not be used by file systems that support cgroup writeback */ +static inline void bdi_wb_stat_mod(struct inode *inode, enum wb_stat_item = item, + s64 amount) +{ + wb_stat_mod(&inode_to_bdi(inode)->wb, item, amount); +} + #ifdef CONFIG_CGROUP_WRITEBACK =20 struct bdi_writeback *wb_get_lookup(struct backing_dev_info *bdi, --=20 2.25.1 From nobody Thu Apr 2 15:37:28 2026 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1E6625783A for ; Fri, 13 Feb 2026 05:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961898; cv=none; b=jtEwir4xP1k+wPu9sxU4qvQZFRUcVF1GIUzv66HAILygwMcOqwKadmG8AtN+xYou8IFQs21wEjj3rXGGV6teGAxeojOSxZfn5AN1mouFjSjXq1d6jsOePoYaW83GjPSx72FRuUKliCaXSch0UW6eTeZXBZ+pCV6Llfvhfz5rcEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961898; c=relaxed/simple; bh=8DkBz+LDe0vWcQaiQfjGq3gTPU8y8dyPEHcSrr7tb/0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=cqRqYX/Hxadmvn3TBu+qyXdkaQih+PJ6tiSwQ3xMiEUINjnhlGLqLpNbQHaO+H2J5KUO3lEz2jVCnj1YhyO7AvcwY19Pr/ROBszI7I7KESgxBcxueeSxY6AXq7e3pwK0S643cAl5e/z2eL50XeWs8bniJHWdo4Qqf5U707oZoSE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=ItMoBkkq; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ItMoBkkq" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20260213055134epoutp0248f4670dae36bfda0f6650a7f6d00c3b~TuHWuDzpF3259332593epoutp02D for ; Fri, 13 Feb 2026 05:51:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20260213055134epoutp0248f4670dae36bfda0f6650a7f6d00c3b~TuHWuDzpF3259332593epoutp02D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770961894; bh=+fi7XhvBJA/4rcnBtM8yogDXj5mpCvXE4Mbm87A1wDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ItMoBkkq5IrA8Ex59WnNNdjgMr1vhmXjJ0IHxPwpReoGvK3Hdqko9ISywXs9RAO+0 0vAwr/weEvNt+Eka+5v8rFFjs0HgPTAOvsk2lupNIASKeDJ9sEE4tVWTOuzr42e8PW 1rc6F22RsvwcCXGDohpWKqM/WqUEPUJyiecY7bAg= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20260213055133epcas5p2bc20a1e513af52dc8ccc5c79fd94f8ea~TuHV5j2sM2327923279epcas5p2E; Fri, 13 Feb 2026 05:51:33 +0000 (GMT) Received: from epcas5p3.samsung.com (unknown [182.195.38.90]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4fC1WS1V73z3hhT7; Fri, 13 Feb 2026 05:51:32 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260213055131epcas5p1fdfcb9e38e3301e0f9f718a751a362f9~TuHUiimdv0793307933epcas5p1J; Fri, 13 Feb 2026 05:51:31 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260213055128epsmtip2f14b508cf8119d23c4449c8e45185d26~TuHRwQL8u2471724717epsmtip2Q; Fri, 13 Feb 2026 05:51:28 +0000 (GMT) From: Kundan Kumar To: jaegeuk@kernel.org, chao@kernel.org, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, hch@lst.de, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk, djwong@kernel.org, jlayton@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, gost.dev@samsung.com, anuj20.g@samsung.com, vishak.g@samsung.com, joshi.k@samsung.com, Kundan Kumar Subject: [PATCH v2 2/4] f2fs: stop using writeback internals for dirty_exceeded checks Date: Fri, 13 Feb 2026 11:16:32 +0530 Message-Id: <20260213054634.79785-3-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260213054634.79785-1-kundan.kumar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260213055131epcas5p1fdfcb9e38e3301e0f9f718a751a362f9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-542,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260213055131epcas5p1fdfcb9e38e3301e0f9f718a751a362f9 References: <20260213054634.79785-1-kundan.kumar@samsung.com> Replace direct dereferences of dirty_exceeded with the core helper bdi_wb_dirty_exceeded(), removing f2fs dependencies on writeback internals. Reviewed-by: Jeff Layton Reviewed-by: Andreas Gruenbacher Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- fs/f2fs/node.c | 4 ++-- fs/f2fs/segment.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 482a362f2625..d450b282cc55 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -78,7 +78,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sbi,= int type) if (excess_cached_nats(sbi)) res =3D false; } else if (type =3D=3D DIRTY_DENTS) { - if (sbi->sb->s_bdi->wb.dirty_exceeded) + if (bdi_wb_dirty_exceeded(sbi->sb->s_bdi)) return false; mem_size =3D get_pages(sbi, F2FS_DIRTY_DENTS); res =3D mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1); @@ -119,7 +119,7 @@ bool f2fs_available_free_memory(struct f2fs_sb_info *sb= i, int type) res =3D false; #endif } else { - if (!sbi->sb->s_bdi->wb.dirty_exceeded) + if (!bdi_wb_dirty_exceeded(sbi->sb->s_bdi)) return true; } return res; diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 07dcbcbeb7c6..d7166f1f000a 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -1000,7 +1000,7 @@ static inline bool sec_usage_check(struct f2fs_sb_inf= o *sbi, unsigned int secno) */ static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type) { - if (sbi->sb->s_bdi->wb.dirty_exceeded) + if (bdi_wb_dirty_exceeded(sbi->sb->s_bdi)) return 0; =20 if (type =3D=3D DATA) --=20 2.25.1 From nobody Thu Apr 2 15:37:28 2026 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73BED274652 for ; Fri, 13 Feb 2026 05:51:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961902; cv=none; b=lNbS9yHQQW41JTHXg7mYDFoY1BDDemeX7QEveXmtuycBe1IxuWS7eQEfaffLHfwW9WK75HwuTjLEPbnf4E2LEuDuVmeOXinv7EFf9rMdxiicb7UURQEhuRsCjjjA6XJIplYkaj2h4rxHLodrXDANT6g4p71IYqJ+6r/Ne9kdypI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961902; c=relaxed/simple; bh=/fK1jbngMa6/JqpfIDNdSzD4oX+xXtcOum67V4za5Oo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=aulcVqTfoV8hySgU80/YCae/43xhrQFEf4r8Xo7wX8xLMUsFD9+E0h96hdtdig1qfrDpPxz+ieaLFyAnYT1XR4oRGpLrG/Cp/8+6pQdDjjLnnclxJ9BS0kGRp4CPvSVJIyv2Ph3H9Krr/JfD5i+i39V9vvplNld7LyQnUNmZW6E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=U02feq5O; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="U02feq5O" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260213055138epoutp0163c188fa21eb416a37b0f047708e95f4~TuHa_hfCD2881728817epoutp01z for ; Fri, 13 Feb 2026 05:51:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260213055138epoutp0163c188fa21eb416a37b0f047708e95f4~TuHa_hfCD2881728817epoutp01z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770961898; bh=GDVcAGbX+6+fS68q52mUWNCiGdwubcd88imzb/VPBgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U02feq5OZn+prBrZ000m3xY3Q7QnAOuiFmLpupV/9E5QYUsvmsjVgQidPaarY+R91 dcpYqLoGcAJMNaaYzHFpml2wIcn/kJK94lcNyANF+RzNcX8VXwykYFbOZkOJ3wO1t8 ty1HtwnJCiXyi8r8xjIgPP+WJpQvfv5o44yV+yto= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20260213055138epcas5p2cff9e249420c9e1e49533df5ec6b97a5~TuHaeL41X0260502605epcas5p2D; Fri, 13 Feb 2026 05:51:38 +0000 (GMT) Received: from epcas5p4.samsung.com (unknown [182.195.38.87]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4fC1WY09tSz3hhTJ; Fri, 13 Feb 2026 05:51:37 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20260213055136epcas5p2f13881eb387cff40137199086e06f965~TuHY1bZy32327923279epcas5p2L; Fri, 13 Feb 2026 05:51:36 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260213055131epsmtip21d249fe955d6286e5d3a1f88d5825e9f~TuHUyS2XA2622126221epsmtip2D; Fri, 13 Feb 2026 05:51:31 +0000 (GMT) From: Kundan Kumar To: jaegeuk@kernel.org, chao@kernel.org, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, hch@lst.de, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk, djwong@kernel.org, jlayton@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, gost.dev@samsung.com, anuj20.g@samsung.com, vishak.g@samsung.com, joshi.k@samsung.com, Kundan Kumar Subject: [PATCH v2 3/4] gfs2: stop using writeback internals for dirty_exceeded check Date: Fri, 13 Feb 2026 11:16:33 +0530 Message-Id: <20260213054634.79785-4-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260213054634.79785-1-kundan.kumar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260213055136epcas5p2f13881eb387cff40137199086e06f965 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-542,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260213055136epcas5p2f13881eb387cff40137199086e06f965 References: <20260213054634.79785-1-kundan.kumar@samsung.com> Convert gfs2 dirty_exceeded handling to use the writeback core helper instead of accessing writeback directly. Reviewed-by: Jeff Layton Reviewed-by: Andreas Gruenbacher Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- fs/gfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index f6cd907b3ec6..7ddeee19dec4 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -447,7 +447,7 @@ static int gfs2_write_inode(struct inode *inode, struct= writeback_control *wbc) gfs2_log_flush(GFS2_SB(inode), ip->i_gl, GFS2_LOG_HEAD_FLUSH_NORMAL | GFS2_LFC_WRITE_INODE); - if (bdi->wb.dirty_exceeded) + if (bdi_wb_dirty_exceeded(bdi)) gfs2_ail1_flush(sdp, wbc); else filemap_fdatawrite(metamapping); --=20 2.25.1 From nobody Thu Apr 2 15:37:28 2026 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC3E2277C86 for ; Fri, 13 Feb 2026 05:51:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961909; cv=none; b=sYjFVyMvLV5FBr6OLHyDt5fxdTkiBupyFhzjH1HckYWmBII117yK0fUo6Iaww9cmsn9UnjMTnZkh53H3/5jVp33yLi8muhNXHj492j8lpjsEuq0zoSUvYNSkDAuNohHvHnvwoltM8n+OavL/mmzNzx+K99M/hbIjjHjClFgxBp4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770961909; c=relaxed/simple; bh=j+bCGXMTmziZDXXtEy5hW+Hxg9b93ucLfIZcyJ7PM6g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=bGNtSG0d51Ml7H3hpYEyWkEnXy1Ncyz7D4CRhe0HOidOfymoD5rjz3C28/g2mfEtvToVj6B9LFRAxD18ze4aVwZgTU18ArM7KdiFK6+ebroSYGdqG8P39pPu5/TsrwTIJvxZf2L37BSVHW7OKZloDO8AbQVfXZa7eCNuE+jW730= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=sR5Bd++N; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="sR5Bd++N" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260213055145epoutp04ed1df21ea9f9bb57ce51d339684f2b07~TuHhrmfL61267212672epoutp04D for ; Fri, 13 Feb 2026 05:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260213055145epoutp04ed1df21ea9f9bb57ce51d339684f2b07~TuHhrmfL61267212672epoutp04D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770961905; bh=WVUkVxdLZh7dLWtrxwE5uvhOTSw4xvRRD2G/b4/jnPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sR5Bd++N6xGlqfBAAQiW4PWY+ytP+oZxAcdXOEaUOH6XAZb1QkXjhFn4p88p7fSQp IgW4+oU4mBdLfnk6XE2hKG56ZHj1qHTbApD7vuAr2A7jSdX/EN3ss1wPf4YyS9iNad ATftZG7KD0BUsolWwXrEw1qL9TWSqOL+eBeNyUQw= Received: from epsnrtp04.localdomain (unknown [182.195.42.156]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPS id 20260213055145epcas5p4af1fac07bbabbaf11e521102bd53c538~TuHhJu_df2583525835epcas5p4U; Fri, 13 Feb 2026 05:51:45 +0000 (GMT) Received: from epcas5p3.samsung.com (unknown [182.195.38.88]) by epsnrtp04.localdomain (Postfix) with ESMTP id 4fC1Wd1twtz6B9m5; Fri, 13 Feb 2026 05:51:41 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20260213055140epcas5p31b62f7026bd30c79f804c8c0fc02e276~TuHcw1i4J2435024350epcas5p3_; Fri, 13 Feb 2026 05:51:40 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260213055136epsmtip2f67a407f2147b68c7ca6a288c6a4ead3~TuHZIiX9u2622126221epsmtip2G; Fri, 13 Feb 2026 05:51:36 +0000 (GMT) From: Kundan Kumar To: jaegeuk@kernel.org, chao@kernel.org, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, hch@lst.de, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk, djwong@kernel.org, jlayton@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, gost.dev@samsung.com, anuj20.g@samsung.com, vishak.g@samsung.com, joshi.k@samsung.com, Kundan Kumar Subject: [PATCH v2 4/4] nfs: stop using writeback internals for WB_WRITEBACK accounting Date: Fri, 13 Feb 2026 11:16:34 +0530 Message-Id: <20260213054634.79785-5-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260213054634.79785-1-kundan.kumar@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260213055140epcas5p31b62f7026bd30c79f804c8c0fc02e276 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-542,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260213055140epcas5p31b62f7026bd30c79f804c8c0fc02e276 References: <20260213054634.79785-1-kundan.kumar@samsung.com> Convert NFS WB_WRITEBACK accounting to writeback helper, eliminating direct access to writeback. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- fs/nfs/internal.h | 2 +- fs/nfs/write.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 2e596244799f..96249d6d9132 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -866,7 +866,7 @@ static inline void nfs_folio_mark_unstable(struct folio= *folio, * writeback is happening on the server now. */ node_stat_mod_folio(folio, NR_WRITEBACK, nr); - wb_stat_mod(&inode_to_bdi(inode)->wb, WB_WRITEBACK, nr); + bdi_wb_stat_mod(inode, WB_WRITEBACK, nr); __mark_inode_dirty(inode, I_DIRTY_DATASYNC); } } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index bf412455e8ed..9053e0c4a836 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -872,8 +872,7 @@ static void nfs_folio_clear_commit(struct folio *folio) long nr =3D folio_nr_pages(folio); =20 node_stat_mod_folio(folio, NR_WRITEBACK, -nr); - wb_stat_mod(&inode_to_bdi(folio->mapping->host)->wb, - WB_WRITEBACK, -nr); + bdi_wb_stat_mod(folio->mapping->host, WB_WRITEBACK, -nr); } } =20 --=20 2.25.1