From: Kundan Kumar <kundan.kumar@samsung.com>
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 <kundan.kumar@samsung.com>
Subject: [PATCH 1/4] writeback: prep helpers for dirty-limit and writeback accounting
Date: Wed, 11 Feb 2026 12:30:54 +0530 [thread overview]
Message-ID: <20260211070057.22001-2-kundan.kumar@samsung.com> (raw)
In-Reply-To: <20260211070057.22001-1-kundan.kumar@samsung.com>
Add helper APIs needed by filesystems to avoid poking into writeback
internals.
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>
---
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)
extern void wb_writeout_inc(struct bdi_writeback *wb);
+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.
*/
--
2.25.1
next prev parent reply other threads:[~2026-02-11 7:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260211070533epcas5p32f50f317b20250bb61b1b5a0b3a2a5d9@epcas5p3.samsung.com>
2026-02-11 7:00 ` [PATCH 0/4] Avoid filesystem references to writeback internals Kundan Kumar
[not found] ` <CGME20260211070537epcas5p11bcbdc3d5ab68e1b9b7ec68feda22487@epcas5p1.samsung.com>
2026-02-11 7:00 ` Kundan Kumar [this message]
2026-02-11 10:39 ` [PATCH 1/4] writeback: prep helpers for dirty-limit and writeback accounting Jan Kara
[not found] ` <CGME20260211070540epcas5p3ba81064a4695a85d47735158b49f16e7@epcas5p3.samsung.com>
2026-02-11 7:00 ` [PATCH 2/4] f2fs: stop using writeback internals for dirty_exceeded checks Kundan Kumar
[not found] ` <CGME20260211070543epcas5p44f11ea9b90ce0eb480e2b5ce0941559a@epcas5p4.samsung.com>
2026-02-11 7:00 ` [PATCH 3/4] gfs2: stop using writeback internals for dirty_exceeded check Kundan Kumar
[not found] ` <CGME20260211070546epcas5p486d5ecfe6754e6237fe3a428705db456@epcas5p4.samsung.com>
2026-02-11 7:00 ` [PATCH 4/4] nfs: stop using writeback internals for WB_WRITEBACK accounting Kundan Kumar
2026-02-11 13:30 ` [PATCH 0/4] Avoid filesystem references to writeback internals Jeff Layton
2026-02-11 13:49 ` Andreas Gruenbacher
2026-02-11 15:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260211070057.22001-2-kundan.kumar@samsung.com \
--to=kundan.kumar@samsung.com \
--cc=agruenba@redhat.com \
--cc=anna@kernel.org \
--cc=anuj20.g@samsung.com \
--cc=brauner@kernel.org \
--cc=chao@kernel.org \
--cc=djwong@kernel.org \
--cc=gfs2@lists.linux.dev \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=joshi.k@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=pankaj.raghav@linux.dev \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=vishak.g@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®