summaryrefslogtreecommitdiffstats
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-08-26 09:06:55 -0700
committerJens Axboe <axboe@kernel.dk>2019-08-27 09:22:38 -0600
commitd62241c7a406f0680d702bd974f6f17e28ab8e5d (patch)
tree284d9d72f978a881034a791a8692994252b6b93b /include/linux/writeback.h
parented288dc0d4aa29f65bd25b31b5cb866aa5664ff9 (diff)
downloadlinux-stable-d62241c7a406f0680d702bd974f6f17e28ab8e5d.tar.gz
linux-stable-d62241c7a406f0680d702bd974f6f17e28ab8e5d.tar.bz2
linux-stable-d62241c7a406f0680d702bd974f6f17e28ab8e5d.zip
writeback, memcg: Implement cgroup_writeback_by_id()
Implement cgroup_writeback_by_id() which initiates cgroup writeback from bdi and memcg IDs. This will be used by memcg foreign inode flushing. v2: Use wb_get_lookup() instead of wb_get_create() to avoid creating spurious wbs. v3: Interpret 0 @nr as 1.25 * nr_dirty to implement best-effort flushing while avoding possible livelocks. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 8945aac31392..a19d845dd7eb 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -217,6 +217,8 @@ void wbc_attach_and_unlock_inode(struct writeback_control *wbc,
void wbc_detach_inode(struct writeback_control *wbc);
void wbc_account_cgroup_owner(struct writeback_control *wbc, struct page *page,
size_t bytes);
+int cgroup_writeback_by_id(u64 bdi_id, int memcg_id, unsigned long nr_pages,
+ enum wb_reason reason, struct wb_completion *done);
void cgroup_writeback_umount(void);
/**