From nobody Thu Apr 2 15:37:27 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 A01BE32C31B for ; Wed, 11 Feb 2026 07:05:41 +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=1770793544; cv=none; b=fKnYmPJy6o6eflqq7Syrm4i7uoaj9FCDy1UPp+DTdvf44pXEd7Y3CdsUGUXuHtaFnw1n/kTlVlwfLO1GHrH2yWmAKxEpO0Icx0R+z/+vN3Xj0O9LoexAoVgS4sXePurYqifFnzsXfuWngommaKOvThz60bcsVi9E2ofPbGZrufQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770793544; c=relaxed/simple; bh=djZiiRv4Atfe0TSz4MTf3POZZCovBo80N3X43c5UC2o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=ODd5RiQ7wf7huJxnuvFapr+qX119H5jpFF3W4H/Gw3s3levmf1+MA3n4jnIWpEQu5DynWQZZRuRCX61Re4WUZqsbW84oiZ5CkV3kponMFHPEXOtm51x5uD8krp7gu0F2zXpq91HAbzZp2dTiZJDzMIzgeQbRUu3QXY0etIfjRsI= 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=Rqm4prS3; 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="Rqm4prS3" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260211070539epoutp01360139865d270e18ec36dffd0d31abc5~TH1ea3c9a2088420884epoutp01h for ; Wed, 11 Feb 2026 07:05:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260211070539epoutp01360139865d270e18ec36dffd0d31abc5~TH1ea3c9a2088420884epoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770793539; bh=BF/a5V2IAl0CQ6EVXzXFAOoP6G59N24GE3IM1SlFR8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rqm4prS3JvFvBnhAHAlZW+81XvflSxaRZtvoTeqYOtyvBNmkKIOcc9+DanCwx1QJv ujey0xlDsQWfVMS6hrz3kLfj/7UU7v5G+aFSQb7BMvXQDrGdzjZxdNEDBpI1shlsD8 dtQNU3H3uQR0YN8/NAku305i1yMutgyEg3m/2Cw0= Received: from epsnrtp02.localdomain (unknown [182.195.42.154]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260211070538epcas5p1be00489644f05334d8d9ef50a4e4f4c5~TH1dpqVRp2433424334epcas5p1J; Wed, 11 Feb 2026 07:05:38 +0000 (GMT) Received: from epcas5p2.samsung.com (unknown [182.195.38.94]) by epsnrtp02.localdomain (Postfix) with ESMTP id 4f9qFs5bzlz2SSKh; Wed, 11 Feb 2026 07:05:37 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260211070537epcas5p11bcbdc3d5ab68e1b9b7ec68feda22487~TH1cO4IxW2671026710epcas5p1J; Wed, 11 Feb 2026 07:05:37 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260211070534epsmtip2c653cdb90b99f4e1ceaad6e2f182b918~TH1ZWrf7i0195901959epsmtip2W; Wed, 11 Feb 2026 07:05:33 +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, pankaj.raghav@linux.dev 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, mcgrof@kernel.org, Kundan Kumar Subject: [PATCH 1/4] writeback: prep helpers for dirty-limit and writeback accounting Date: Wed, 11 Feb 2026 12:30:54 +0530 Message-Id: <20260211070057.22001-2-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260211070057.22001-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: 20260211070537epcas5p11bcbdc3d5ab68e1b9b7ec68feda22487 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: 20260211070537epcas5p11bcbdc3d5ab68e1b9b7ec68feda22487 References: <20260211070057.22001-1-kundan.kumar@samsung.com> Add helper APIs needed by filesystems to avoid poking into writeback internals. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Andreas Gruenbacher Reviewed-by: Jan Kara Reviewed-by: Jeff Layton --- include/linux/backing-dev.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0c8342747cab..4165ad3ddf00 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -78,6 +78,17 @@ static inline s64 wb_stat_sum(struct bdi_writeback *wb, = enum wb_stat_item item) =20 extern void wb_writeout_inc(struct bdi_writeback *wb); =20 +static inline int bdi_wb_dirty_exceeded(struct backing_dev_info *bdi) +{ + return bdi->wb.dirty_exceeded; +} + +static inline void bdi_wb_stat_mod(struct backing_dev_info *bdi, + enum wb_stat_item item, s64 amount) +{ + wb_stat_mod(&bdi->wb, item, amount); +} + /* * maximal error of a stat counter. */ --=20 2.25.1 From nobody Thu Apr 2 15:37:27 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 B9F8E34EEE4 for ; Wed, 11 Feb 2026 07:05:43 +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=1770793545; cv=none; b=HO3fSkgd4gSkY5Lf8emtQ1bREJq0bLXfpWsFIFyAZ3f0SHYWReE4AxBitJP1oAbRs53AtbAGcDNr3Zdk1ZmE+/CZxoh4ULZlhlOcK5koKKMdbqBNSRLWO7IcofoC4Nq2WYmCiG3mgJhPRJK2Xe6hPQs5oGIfy90xoKN7qb80TOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770793545; c=relaxed/simple; bh=M1NRjmEMDyy+oOgvl+VQv+6y7EvEZ/LU64AnDJ077DQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=rzoLFgyIHyYRAnOARKp+Kz5mvgyp5L9zujIhHzEQzv9q2zSm5Fkqzwe4Y5Wx77MCynyWFZicmaR0LcybTM/q2vicnD0akzRvaJsn/u9ziKt3c01oAHI5pNL09gpeBWlAHHSFP7Q9sShBmFsw3RJfuZQqMcdlPVwl0xNymq3f/KQ= 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=LMvy3gUv; 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="LMvy3gUv" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260211070541epoutp044a2499187abc8f909c82e0fe3b9ea5f4~TH1gpPlRo0340803408epoutp04j for ; Wed, 11 Feb 2026 07:05:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260211070541epoutp044a2499187abc8f909c82e0fe3b9ea5f4~TH1gpPlRo0340803408epoutp04j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770793542; bh=edeVYa6HjHZ4mu4TNinC+G+5M3aq+ckeGzSwrEoltMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LMvy3gUvCJf/1DJaXIxfPG1cRevV5P4rAjpge+evgwIifTEksyawHm4a+gn35ta/E owRP/ZQMK01O1dDKzMzZMSQ5a6T9B6mojpdsSE9y7SZTXEzgYqHFiDVnKy2M65N/C9 zg0ub7EQvBLwn2n3xvDTUlK9iICuT7ZlPO4msXx4= Received: from epsnrtp04.localdomain (unknown [182.195.42.156]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20260211070541epcas5p22ea11564e42c12bf2d2a7997c38e4772~TH1gGnm850532905329epcas5p2P; Wed, 11 Feb 2026 07:05:41 +0000 (GMT) Received: from epcas5p2.samsung.com (unknown [182.195.38.89]) by epsnrtp04.localdomain (Postfix) with ESMTP id 4f9qFw3zKpz6B9m5; Wed, 11 Feb 2026 07:05:40 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20260211070540epcas5p3ba81064a4695a85d47735158b49f16e7~TH1e6Q9yM1263912639epcas5p3N; Wed, 11 Feb 2026 07:05:40 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260211070537epsmtip2d73bad556e4e9fae0a3866bd2089ad7c~TH1cP-LPZ0195901959epsmtip2X; Wed, 11 Feb 2026 07:05:37 +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, pankaj.raghav@linux.dev 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, mcgrof@kernel.org, Kundan Kumar Subject: [PATCH 2/4] f2fs: stop using writeback internals for dirty_exceeded checks Date: Wed, 11 Feb 2026 12:30:55 +0530 Message-Id: <20260211070057.22001-3-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260211070057.22001-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: 20260211070540epcas5p3ba81064a4695a85d47735158b49f16e7 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: 20260211070540epcas5p3ba81064a4695a85d47735158b49f16e7 References: <20260211070057.22001-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. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Andreas Gruenbacher Reviewed-by: Jeff Layton --- 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:27 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 411E234D91C for ; Wed, 11 Feb 2026 07:05:49 +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=1770793550; cv=none; b=qf9LP5x8pQ9thfW9nA0KK+0ozP7kRBNpLIBb6gcT7SaNdHkNGYjVmFKm9kzoI4sxR4ycO+RQFhNyE0RByYWijdUNWocpRipvzKHnmbvQEQ2eDep7d0EP9DhxeS45/RZ72n3AnqYFdXn2l+BDcmqfbUQFeHFvX6K/HrkJc3TwTL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770793550; c=relaxed/simple; bh=TpVVBK8Q3EN3PZEIhIdwOba0ifpOdZlfesfY2OP6b4w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=HnnkQLXkklTXYmRiI7I6tHobkDGL25nixItfrq18FH9TknevNhzKgL7nZflZWJhXTs0f+b5MbO8nj2d1xPJX9aeRRK05HhT1E4peZThsHIA2CpYI2w7FF8lYs0Vrk8P19y/9KfIwqtrFfXMWw+AMeDzN3KOrYfeK+zh721XxBoo= 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=vG2Z/AmV; 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="vG2Z/AmV" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260211070547epoutp0442574f810ed3d52874336304e3f2e11d~TH1ljlF3p0305503055epoutp04J for ; Wed, 11 Feb 2026 07:05:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260211070547epoutp0442574f810ed3d52874336304e3f2e11d~TH1ljlF3p0305503055epoutp04J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770793547; bh=h24FKhiaOy+Lutbyj9qFXxdAOruWVEGhaIk65WyfYFw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vG2Z/AmVmSMN84JJ+vsOkVuF7lFFsK0R5hYzz0oYPh1uoUuPMZ6QiNHtULXIteLpQ WjKfPmY0665Xo2HoaNAMPa52J6w/xjlgnUHv0T8JCDzg/ptzMhXxKZ4bRyZcD8gQlN 6dKXWahYbbuid/Dc3pA82J+CQcGw4EidKrtpZq+k= Received: from epsnrtp02.localdomain (unknown [182.195.42.154]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPS id 20260211070544epcas5p4534cc829b35964b66e7e9dec40deae2f~TH1i76OZH3071530715epcas5p4t; Wed, 11 Feb 2026 07:05:44 +0000 (GMT) Received: from epcas5p1.samsung.com (unknown [182.195.38.93]) by epsnrtp02.localdomain (Postfix) with ESMTP id 4f9qFz4rwrz2SSKf; Wed, 11 Feb 2026 07:05:43 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20260211070543epcas5p44f11ea9b90ce0eb480e2b5ce0941559a~TH1hzeg-k3071530715epcas5p4i; Wed, 11 Feb 2026 07:05:43 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260211070540epsmtip2df267b8ed7e5bbd98bb7dfe147df4c7a~TH1fKMRAL0204902049epsmtip2K; Wed, 11 Feb 2026 07:05:40 +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, pankaj.raghav@linux.dev 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, mcgrof@kernel.org, Kundan Kumar Subject: [PATCH 3/4] gfs2: stop using writeback internals for dirty_exceeded check Date: Wed, 11 Feb 2026 12:30:56 +0530 Message-Id: <20260211070057.22001-4-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260211070057.22001-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: 20260211070543epcas5p44f11ea9b90ce0eb480e2b5ce0941559a 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: 20260211070543epcas5p44f11ea9b90ce0eb480e2b5ce0941559a References: <20260211070057.22001-1-kundan.kumar@samsung.com> Convert gfs2 dirty_exceeded handling to use the writeback core helper instead of accessing writeback directly. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Andreas Gruenbacher Reviewed-by: Jeff Layton --- 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:27 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 F315034D4E9 for ; Wed, 11 Feb 2026 07:05:49 +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=1770793551; cv=none; b=IR6Ww1RE1+qb424Wdn+Iiap1hFk/5oZF4L2deGrzwHphZeEozw/4uazL4HqGdNEA3e29vRbO5lqt6ySNSBmFXjstWzG5nZfdY8JMPl68/p7rj6zH/H0r1VHNVt/8mMCN0J7ICw3kXEQZgTakNDAjsjG6nC/2tSv991C0dvPUxO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770793551; c=relaxed/simple; bh=HA3V9wjv2k47ahT8HxVZRWsPsA1moBTdIeFNk9xDkW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=NYkR1vJZ44xNmecoZraYnG6iKplk8ch0WjFmUAZlI0X+Ws5adUK+yvamu8CkaY4Rqwk52MevTWlwj/miwBzB2E2baMxwWCNYrUjbhRxRptu4J8NL9cyvLejF14N31S2VNOFPtqmzEnjftHpIkcDgnBu/WGOTdnQAeFo7E74+nW8= 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=WWUr6nZc; 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="WWUr6nZc" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20260211070548epoutp0323e60c8ff196949f6c1337bbff90078f~TH1mXlHe82980829808epoutp033 for ; Wed, 11 Feb 2026 07:05:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20260211070548epoutp0323e60c8ff196949f6c1337bbff90078f~TH1mXlHe82980829808epoutp033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1770793548; bh=zszdhhsrv+up7ZflU5pHLQgNi3Fdy52nk5y4MQowDYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWUr6nZcjgHEPbuOWxqLj6c5sQ+lkAaT3ncuY1G/MbqO/p3AMo70C+4eq5S56ReMj ECOVKuaONKdh16KXE//3K0JTSjleo8r614eFQ/c/+euucns5DCg9j7GcyQeNjr3JDe +/+ROg7B5TVn4MzxYmzW2L2YyVxzE3bs/H+GnQhg= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260211070547epcas5p1025d920a110b5eea592d51eb0e1aec0c~TH1l5Q-u02670926709epcas5p1c; Wed, 11 Feb 2026 07:05:47 +0000 (GMT) Received: from epcas5p1.samsung.com (unknown [182.195.38.91]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4f9qG26XHvz3hhTC; Wed, 11 Feb 2026 07:05:46 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20260211070546epcas5p486d5ecfe6754e6237fe3a428705db456~TH1kyHT_a2610826108epcas5p4S; Wed, 11 Feb 2026 07:05:46 +0000 (GMT) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260211070543epsmtip238fdf67c48a700330e71852ca4040edb~TH1iDhZo40199301993epsmtip2i; Wed, 11 Feb 2026 07:05:43 +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, pankaj.raghav@linux.dev 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, mcgrof@kernel.org, Kundan Kumar Subject: [PATCH 4/4] nfs: stop using writeback internals for WB_WRITEBACK accounting Date: Wed, 11 Feb 2026 12:30:57 +0530 Message-Id: <20260211070057.22001-5-kundan.kumar@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260211070057.22001-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: 20260211070546epcas5p486d5ecfe6754e6237fe3a428705db456 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: 20260211070546epcas5p486d5ecfe6754e6237fe3a428705db456 References: <20260211070057.22001-1-kundan.kumar@samsung.com> Convert NFS WB_WRITEBACK accounting to bdi-scoped writeback helper, eliminating direct access to writeback. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Reviewed-by: Andreas Gruenbacher Reviewed-by: Jeff Layton --- fs/nfs/internal.h | 2 +- fs/nfs/write.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 2e596244799f..a738c357b153 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_to_bdi(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..c56b15b5380f 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -872,8 +872,8 @@ 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(inode_to_bdi(folio->mapping->host), + WB_WRITEBACK, -nr); } } =20 --=20 2.25.1